Salut Gary Weinfurther !
Dans un message de Gary Weinfurther dat‚ du 09 Feb 97 08:50:00 il ‚tait dit:
GW> Delphi 2 strings are null-terminated.
Not exactly. They are in fact a record with two fields. One is the
length and the other is a pointer to the actual characters forming the
string. Those characters are null-terminated. And the null byte
does'nt count into the length.
When you cast a string to a PChar, the compiler just return the
pointer field. Using the Length() operator returns the length field
(or set the length field is case of setlength()).
Amiti‚s,
{-Francois Piette-}
francois.piette@ping.be
http://www.rtfm.be/fpiette
--- SvFido 1.32
---------------
* Origin: OverByte BBS (Embourg-Belgium) 32-4-3651395 VFC/V34+ (2:293/2202)
|