[fpc-devel]SizeOf() reports 0 for Var Paramaters. (1.1)

Marco van de Voort marcov at stack.nl
Sun Jul 27 20:34:25 CEST 2003


> Marco van de Voort wrote:
> 
> >proceduer bla(var a: array of longint);      
> >// high() and sizeof() are possible
> >
> >and for
> >
> >procedure bla(var a);           
> >// none.
> >
> >I'm pretty certain it was the same for 1.0.6. This was already the
> >case in BP/TP (e.g. see the blockwrite and blockread procedures that
> >require the length to be explicitely passed)
> >  
> >
> Fpc 1.0.6's SizeOf used to report 4 (regardless of the size of the 

1.0.10 also report 4. 1.1 reports 0.

> parameter actually passed) and I submitted a bug report, so it was fixed:
> http://www.freepascal.org/bugs/showrec.php3?ID=2561
> http://www.freepascal.org/bugs/showrec.php3?ID=2562

These say that it is fixed in 1.1, and that's true, I verified this.

Probably Peter only fixed it in 1.1, because he considered it a minor bug (
code that relies on this is IMHO severly broken).





More information about the fpc-devel mailing list