On Wed, 30 Apr 2003, Frank Heckenbach wrote:
Peter N Lewis wrote:
At 2:35 PM +0100 29/4/03, Prof. A Olowofoyeku (The African Chief) wrote:
BTW: a CString/pChar is type-compatible with zero-based arrays of char (e.g., var foo : array [0..1023] of char). I think you might have to use {$X+} in your code for this - but I don't remember (I always use it anyway).
So basically, CString is ^Char, but why then can it be accessed as an array?
BP compatibility (which in this case means C compatibility)-: ...
Can any other pointers be accessed as arrays?
Nope (at least not intentionally).
[..]
Would it be less confusing if CString was defined as an array accessed by a pointer of the same name?
Russ