TIP: Click on subject to list as thread! ANSI
echo: delphi
to: GARY WEINFURTHER
from: FRANCOIS PIETTE
date: 1997-02-11 20:52:00
subject: Binairy Files from C++ to

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.