Bug #256
openGlobal variables are not initialized when attempt is made to access them inside a procedure, if they weren't touched other than the Global statement.
0%
Description
See related issue #152 regarding Help_31.
Previously, the windows would open, but used the wrong background colors.
Now, the first click generates a Software Failure at this command:
Border Rnd(4)+1,P,15-P
Apparently, the reason it fails is that the Global variable P is returning NaN.
This causes a Magician error. If, however, P is accessed before calling the
procedure, it succeeds. (Even attempting to "Print P" before calling will make it work.)
The Global statement itself, should initialize the variable to it's default value if it hasn't already been declared.
Note: Help_31 was mostly working in previous version. Now it causes Software Failure - Magician Meditation.
Updated by Brian Flanagan over 4 years ago
- Affected version changed from 0.9.5 to 0.9.5.1
Updated by Brian Flanagan over 4 years ago
- Affected version changed from 0.9.5.1 to 0.9.6
Changed 0.9.5.1 to 0.9.6 (affected version). Problem still exists:
Additional information: Verified in Help_31 after 1. correcting the Drive not found error, and adding debugging statement inside the "MORE" procedures.
Printing the value of P (Global) indicated that it was NaN. When I inserted a P=0 right after the global statement, then it worked.