[fpc-pascal] ReadLn issues a warning
Michael Van Canneyt
michael at freepascal.org
Sat May 14 12:12:50 CEST 2005
On Sat, 14 May 2005, Yiannis Dondos wrote:
> Hello everybody,
>
> could you please tell me if there is something wrong with the following
> code:
>
> program test1;
>
> var
> f: Text;
> i: Integer;
> s: ShortString;
>
> begin
> Assign (f, 'test.dat');
> Reset (f);
>
> ReadLn (f, i);
> ReadLn (f, s); // Warning: Variable not initialized
>
> Close (f);
> end.
>
> FPC 1.9.8 on Linux issues a warning that FPC 1.0.10 never did.
> The question is why the string variable needs to be initialized?
It does not need to be. The warning is bogus. This is a bug.
Michael.
More information about the fpc-pascal
mailing list