[fpc-pascal] Pointers

Ralf A. Quint FreeDOS at gmx.net
Thu Feb 11 21:24:03 CET 2010


At 12:07 PM 2/11/2010, Jonas Maebe wrote:

>On 11 Feb 2010, at 18:17, Rainer Stratmann wrote:
>
>>In the past with the turbopascal compiler and other always sizeof
>>byte was
>>added.
>
>That is not true. This program prints "2" when compiled under Turbo
>Pascal:

I am fairly certain that he confuses this with the special case of 
applying sizeof() to a string type, where you always get one byte 
more (the preceding length byte) than the string type has been 
defined, for example SizeOf (String [80]) will return 81, 80 bytes 
reserved for the contents plus the length byte...

Ralf 




More information about the fpc-pascal mailing list