HP Forums
Prime: different kind of variables in programs (visibility) - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: Articles Forum (/forum-14.html)
+--- Thread: Prime: different kind of variables in programs (visibility) (/thread-213.html)



Prime: different kind of variables in programs (visibility) - patrice - 12-23-2013 01:13 AM

Exemple program code
Code:
EXPORT MyExpVar;
MyGlobVar;

EXPORT MYFunc()
BEGIN
LOCAL MyLocvar;
...
END;
MyExpVar is visible everywhere, in all functions of all programs, and Home and memory manager. It is the EXPORT keyword that make it visible from outside of program.
MyGlobVar is visible in all functions in this program
MylocVar is visible in this function of this program only.

MyExpVar and MyGlobVar keep their values between runs of the program.
And they are reset to source code values every time the program is recompiled.