Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2015-05

Initialization of variables used in nested methods

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vojtěch Čihák

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.

Reply by email