Whats supposed to happen with the value of globals?
In my module, I have:
int joe1 = 9; // Retains value on module reload
static int joe2 = 9; // Static variables are lost on module load
say("defInit joe1 = " joe1);
say("defInit joe2 = " joe2);
joe1 = joe1 + 1;
joe2 = joe2 + 1;
Expected: Now, everytime I load the module, "joe1" continues to increment, and "joe2" gets reset to 9 -- this is expected.
Unexpected: When I close Slickedit and start it again, joe1 and joe2 retain their values ... continually restarting Slick edit doesn't keep incrementing their values as I would expect.
Odd: If I use Macro: SetMacroVariable and change the value of Joe1, then restart Slick, Slick retains the incremented value of Joe2 as well as the set value of Joe1.
Seems like there is some optimization here ... what makes Slick decide to write global variable values to the STA?