PAGEBREAK trashes variable (OpenInsight 32-bit)
At 09 JAN 2020 10:04:21PM Colin Rule wrote:
Getting a different behaviour between OI808 and OI944
CALL SET_PRINTER("PAGEBREAK","") is trashing a variable in my code, variable called OBJECT, which is a variable in a for/next loop.
AA=OBJECT
CALL SET_PRINTER("PAGEBREAK","")
AB=OBJECT
Test above has AA = 1 and AB = 11
This causes the loop to terminate prematurely.
Is OBJECT a reserved variable now in OI9.4 ?
At 09 JAN 2020 10:36PM Donald Bakke wrote:
I can't duplicate your issue. Assuming your observation is valid (i.e., the only difference is the calling of the PAGEBREAK message), then something else in your code must be contributing to the behavioral oddity. Is OBJECT a local variable or a global common?
At 10 JAN 2020 01:52AM Colin Rule wrote:
The Variable OBJECT is a local common variable.
It is set in a loop, eg "FOR OBJECT = 1 to x"
I have changed to "FOR O =1 to x" to resolve the issue.
But I am not satisfied that this is 100% solved, as the code fragment above shows that the variable changed and its calling an external function outside of my code, ie SET_PRINTER which is changing the variable OBJECT.
At 10 JAN 2020 04:36PM Donald Bakke wrote:
The Variable OBJECT is a local common variable.
What exactly is a local common variable? Did you just mean it's a normal local variable or did you mean it is a common (as in named common) variable, but only used in this program?
Also, what version of the OIPI are you using (i.e., OIPI Classic or OIPI.Net)? Does it work differently if you switch to the other version?