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. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal