[fpc-pascal] Initialization of variables used in nested methods

Vojtěch Čihák vojtech.cihak at atlas.cz
Wed May 13 22:47:59 CEST 2015


Hi,
 
I have question about initialization of variables used in nested methods.
 
This code gives warning: Variable "a" does not seem to be initialized.
 
procedure TForm1.Demo;
var a: Integer;
 
 { procedure ProcNested;
  begin
    a:=1;
  end; }
 
begin
  writeln('a: ', a);
end;       
 
When I uncomment the nested procedure, warning is away although it is never called.
Should I report it?
 
Thanks, V.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150513/839ba50a/attachment.html>


More information about the fpc-pascal mailing list