[fpc-devel] Feature request/discussion - SetLengthNoInit

J. Gareth Moreton gareth at moreton-family.com
Tue Sep 15 06:22:21 CEST 2020

On 14/09/2020 19:41, Michael Van Canneyt via fpc-devel wrote:
>> Better add an additional (optional) parameter SkipInit : Boolean = 
>> False;
>> Michael.

I was probably a bit too critical in my last e-mail.  I'm sure it's 
possible given SetLength is an intrinsic rather than a real subroutine.  
Is it possible to add an extra parameter and have the compiler detect 
whether it is for setting a length or specifying "no initialisation"?  
I'm just a tad concerned about avoiding additional overhead should the 
parameter be omitted and the effect of explicitly specifying False 
(since the actual parameter could be a Boolean variable and the internal 
"set_length_no_init" routine will then require an extra check to see if 
this parameter actually is set to True in order to ensure correct 

Gareth aka. Kit

This email has been checked for viruses by Avast antivirus software.

More information about the fpc-devel mailing list