Different values for "var1". Internal maintenance of the procedure foo is the value of the varible zero. Outside of Procedure, the starting value of the variable.
Uhm... are you saying the problem is var1 is ZERO inside the proc and 1 outside ?
Define is not global, so it's normal that inside the proc var1 is zero.
But define is local to the module's scope, so if you print the value of var1 outside of the proc it's 1.
Try to put an EnableExplicit inside declaremodule.
mk-soft wrote:Different values for "var1". Internal maintenance of the procedure foo is the value of the varible zero. Outside of Procedure, the starting value of the variable.
I'm not able to understand this text.
I'm getting the same output as Luis, and don't see any problem as well.
Maybe using EnableExplicit will help you to understand what's going on.