[fpc-pascal]Behavior of system.New procedure
j.lefrancois at altran-tech.net
Fri Jul 2 09:09:02 CEST 2004
You are not to presume anything.
Perhaps it will be random, perhaps it will be zero filled - depends on the
compiler amongst other things.
You must do as if it contains the most unexpected data, and therefore
initialise the fields *yourself*, and the safer is to do it the quicker.
En réponse à Luiz Américo <pascalive at bol.com.br>:
> If someone can help me with this...
> Take the following example:
> TRec = record
> PRec = ^TRec;
> Return:=ARec^.APointer = nil; (Always True ?)
> Return:=ARec^.Aint = 0; (Always True ?)
> My question is:
> after allocating a new instance for Arec with New proc, the record
> fields (APointer and Aint) will be always zero filled or will receive
> random values?
> Thanks in advance
06 73 27 35 97
More information about the fpc-pascal