On Mon, 1 Jun 1998, Peter Gerwinski wrote:
Dose somebody know whether this
@samp{SetLength} is a Borland Delphi 1.0 extension.
is really true?
It is definitely true of Delphi 2.0, I'm sure it's true of Delphi 1.0 as well since it's in the System Unit. Here's the text straight out of Delphi 2.0's help:
Unit
System
Declaration
procedure SetLength(var S: string; NewLength: Integer);
Description
The SetLength procedure sets the dynamic length of a string variable. For a short string variable, SetLength simply sets the length indicator character (the character at S[0]) to the given value. In this case, NewLength must be a value between 0 and 255. For a long string variable, SetLength reallocates the string referenced by S to the given new length. Any existing characters in the string are preserved, but the contents of any newly allocated space is undefined. If there is not enough memory available to reallocate the string, an EOutOfMemory exception is raised. Following a call to SetLength, S is guaranteed to reference a unique string, that is a string with a reference count of one.
See ya! Orlando Llanes
"Meine Damen und Herren, Elvis hat soeben das Gebaeude verlassen!"
"Look out fo' flyeeng feet" O__/ a010111t@bc.seflin.org /|____. O <__. /> / \ ____________|_________ http://ourworld.compuserve.com/homepages/Monkey414