[fpc-pascal] ReadLn issues a warning
peter at freepascal.org
Sat May 14 12:56:45 CEST 2005
At 12:12 14-5-2005, you wrote:
>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.
The warning is a feature when you call your own made functions. For
functions like readln() this shouldn't be triggered. Please report it as a bug.
More information about the fpc-pascal