Bug #256

Global variables are not initialized when attempt is made to access them inside a procedure, if they weren't touched other than the Global statement.

Added by Brian Flanagan about 4 years ago. Updated almost 4 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Affected version:


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 almost 4 years ago

  • Affected version changed from 0.9.5 to

Updated by Brian Flanagan almost 4 years ago

  • Affected version changed from to 0.9.6

Changed 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.

Also available in: Atom PDF