Post Reply 
How can I have TWO separate Global Variables with the SAME Name?
02-02-2015, 06:41 AM
Post: #5
RE: How can I have TWO separate Global Variables with the SAME Name?
Hello

(01-31-2015 06:04 AM)bobkrohn Wrote:  I didn't realize that Exporting a Variable in a program that has been compiled created a permanent variable.
I had two related programs that did the Export command for "SF".
However, I assumed that they would be referring to the same variable.

I am glad that yo solved your issue.
EXPORT specifies that a global variable of your program is visible/useable from outside your program. It is still that specific program variable. Therefore, yes, it is possible to create 2 variables with the same name.

Know, that you can always refer to a SPECIFIC variable by doing program_name.varaible:= value... this is called fully qualifying a variable.

Of course, the alternative would have been, as you were originally expecting, to have the 2 variables merged, BUT this would most likely have lead to issue with 2 unrelated programs contaminating eachothers's variables.

cyrille
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How can I have TWO separate Global Variables with the SAME Name? - cyrille de brébisson - 02-02-2015 06:41 AM



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