TIP: Click on subject to list as thread! ANSI
echo: delphi
to: BRYAN SMITH
from: ROB WILLIAMS
date: 1997-02-15 13:19:00
subject: Binairy Files from C++ to

BS> FP> Not exactly. They are in fact a record with two fields. One is the
  > FP> length and the other is a pointer to the actual characters forming 
he
  > FP> string. Those characters are null-terminated. And the null byte
  > FP> does'nt count into the length.
BS>I take it, then, that with Delphi 2 you can no longer pull stunts like
BS>  dec(s[0])
BS>to shorten a string by one character, or
BS>  n := 20 ;
  >  if s[0] > char(n) then s[0] := char(n) ;
BS>to set an upper limit to the string length ???
Only if you typecast it to a shortstring, or something like string[255].
Then strings are the "old" style strings, and will work the way you
think they should.
Rob
---
 þ QMPro 1.53 þ WCS Software!-BBS Doors! (503)631-8439/wcssoft.com
1:105/278)
---------------
* Origin: WCS Online!-BBS Doors-Internet-503-631-8439@wcssoft.com

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™.