[fpc-pascal] does FPC support static variable inside a procedure ?

Martin lazarus at mfriebe.de
Thu Sep 27 17:13:51 CEST 2012


On 27/09/2012 16:10, ik wrote:
> Hello,
>
> Is there a way to create a static variable inside a procedure ?
> The following code:
>
> procedure static_variable;
> var static_var : Integer = -1;

const
   static_var: integer = 1;


> begin
>    inc(static_var);
>    writeln('static_var ', static_var);
> end;
>






More information about the fpc-pascal mailing list