Post Reply 
Variables global to a program
12-22-2013, 04:43 AM
Post: #9
RE: Variables global to a program
(12-22-2013 04:02 AM)Michael de Estrada Wrote:  What is your basis for believing these variables "retain" their values. Like Patrice said, they exist only while the program is being executed and then they are gone. MyGlobVar does not exist outside the program, which is why it does not appear in the memory manager. Now, MyExpVar definitely exists and will appear in the User Program Variables list under whatever name you assigned to the program group. It will also retain any value you assigned to it. The only way to delete it is to delete the declaration itself inside the program. If you don't precede your variable names with EXPORT, they will not be retained.

Code:

MYVAR;

EXPORT TEST()
BEGIN
  MYVAR:=MYVAR+1;
END;

Run TEST() a few times.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Variables global to a program - Bob Frazee - 12-22-2013, 01:09 AM
RE: Variables global to a program - Han - 12-22-2013, 03:56 AM
RE: Variables global to a program - Han - 12-22-2013 04:43 AM
RE: Variables global to a program - Han - 12-22-2013, 02:06 PM
RE: Variables global to a program - Snorre - 12-22-2013, 11:56 AM
RE: Variables global to a program - Han - 12-22-2013, 03:52 PM



User(s) browsing this thread: 2 Guest(s)