[fpc-pascal] SetLength procedure
Jürgen Hestermann
juergen.hestermann at gmx.de
Sun Jul 27 12:39:36 CEST 2014
Am 2014-07-27 12:10, schrieb Steve Gatenby:
> Could anybody enlighten me on how to make the 'SetLength' procedure into an equivalent function
> I have many instances of
> SetLength(xxx, Length(xxx)+1);
> Num := High(xxx);
What is the problem with this code?
Why force these 2 commands into a function?
Just to save a little bit of typing?
When *reading* this code it is much
clearer what it does as when reading
Num := IncLength(xxx, 1);
More information about the fpc-pascal
mailing list