Post Reply 
Global vs Local behaviour
05-04-2015, 04:41 AM
Post: #7
RE: Global vs Local behaviour
Hello,

Note that in your function you should be able to do:
EXPORT stg;
EXPORT str(stg)
BEGIN
stg := stg+My_Program_Name.stg;
return stg;
END;

No, the parameter list will not check for globally defined variables and err on it.
That is, in some ways, the whole point of local variables, to 'override' global settings and allow you to create a function that is agnostic of what is happening in the rest of the world.

If it WAS to test for global variables, then the function/program might work on one machine and not on another as the global variable could exist on one calculator and not another, creating problems.

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


Messages In This Thread
Global vs Local behaviour - DrD - 05-02-2015, 03:24 PM
RE: Global vs Local behaviour - kharpster - 05-02-2015, 08:38 PM
RE: Global vs Local behaviour - DrD - 05-02-2015, 09:56 PM
RE: Global vs Local behaviour - kharpster - 05-02-2015, 10:29 PM
RE: Global vs Local behaviour - DrD - 05-03-2015, 02:18 AM
RE: Global vs Local behaviour - kharpster - 05-03-2015, 08:33 PM
RE: Global vs Local behaviour - cyrille de brébisson - 05-04-2015 04:41 AM
RE: Global vs Local behaviour - DrD - 05-04-2015, 11:34 AM
RE: Global vs Local behaviour - DrD - 05-04-2015, 01:47 PM
RE: Global vs Local behaviour - leprechaun - 05-04-2015, 05:47 PM



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