[fpc-pascal] Re: ReadLn issues a warning

Peter Vreman peter at freepascal.org
Fri May 20 13:11:40 CEST 2005


> Hello,
>
> this is a general feature when using an uninitialized variable as a VAR
> parameter.
>
> The compiler cannot know if the called routine needs the parameter values,
> or if the parameter is only used to return values back to the caller.
>
> So, I think, a warning here could be helpful (in the case of READ(LN ) not
> of course, but in other cases).

It is a known issue for Readln() and Str(). The routines need to be
changed from 'var' to 'out'. But changing it short before the release was
too risky.







More information about the fpc-pascal mailing list