[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.4.3 Why does `s[0]' not contain the length?

Q: In standard Pascal you expect `s[1]' to align with the first character position of `s' and thus one character to the left is the length of `s'. Thus `s[0]' is the length of `s'. True?

A: This holds for UCSD/BP strings (which GPC does not yet implement, but that's planned). The only strings Standard Pascal knows are arrays of char without any length value.

GPC also supports Extended Pascal string schemata (see section 4.4.1 What's this confusion about strings?), but they also don't have a length byte at "position 0", but rather a `Length' field (which is larger than one byte).



This document was generated by Frank Heckenbach on May, 10 2002 using texi2html