[fpc-pascal] Writeable typed constants - what's the point?

Jürgen Hestermann juergen.hestermann at gmx.de
Fri Jun 19 18:35:00 CEST 2009

> The "var" version, acts as if your first statement in the procedure was 
> "a:= 1;". It initializes the variable each time you enter the function. 
> If you enter the function recursively, then each level, has it's own a, 
> not touching the value of the callers a

I also used Borlands "const-hack" a lot. But now I changed my behaviour 
and use VAR declarations directly before the function declaration (one 
level higher, outside the function context). That serves the same purpose.

Jürgen Hestermann.

More information about the fpc-pascal mailing list