Hello, Is there a way to create a static variable inside a procedure ? The following code:
procedure static_variable;
var static_var : Integer = -1;
begin
inc(static_var);
writeln('static_var ', static_var);
end;
begin
while true do
begin
static_variable;
sleep(1000);
end;
end.
Always print "0" as the answer.
Ido
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
