Marco van de Voort wrote:
Maurice Lombardi wrote:
Probably a name like pCString (like BP's pChar but more exact) would avoid any confusion of this kind in being clear by itself. Clarity is one of the benefits one looks in using pascal rather than C.
Frank Heckenbach wrote:
(I also think `PChar' is unprecise because is suggests that it's a pointer to a single char rather than a string -- which is the same in C, but not in Pascal.)
What about 'pChars'? (It's my self-made naming convention in my own projects to use p<plural of foo> for a 'pointer to an array of foo'. Due to my experience, it works fine to avoid confusion.)
Actually, multiple chars is NOT a C string. E.g. a string could be padded with a certain char instead of nul terminated.
Hmm, pNulTerminatedArrayOfChars ?
Yes, but we should also make clear that the array is 0 based (and not 1 based like, e.g., required for SP strings). So we have PZeroTerminatedZeroBasedArrayOfChars, or for short PZZChars.
Hmm, can we perhaps find some adjective starting with `i', then we could get PizzaChar. ;-)
Naah, pCString is better then.
To me that's just as good or bad as CString (and not enough of a reason for major changes) ...
Frank