Post Reply 
Global vs Local behaviour
05-02-2015, 10:29 PM (This post was last modified: 05-03-2015 12:57 AM by kharpster.)
Post: #4
RE: Global vs Local behaviour
My apologies DrD, I was mistakenly addressing global variables used within a project. Using the EXPORT command when declaring a variable exposes the variable so that as you have stated, it can be used as input for another function or program after your program has completed execution. Whereas my coding example is how global variables are defined for use within projects that contain multiple subprograms. Variables declared globally as I have shown are available for use within every subprogram in your project. You can refer to a prior post of mine http://www.hpmuseum.org/forum/thread-3596.html in which I have a working project that demonstrates the use of global variables in a project that contains multiple subprograms (procedures).

Back to the EXPORT variable issue. I would personally never use the "EXPORT" variable in my code until right before I performed the Return operation, where I would populate it accordingly.

Like this:

Code:

EXPORT stg:= "DRD";

EXPORT str(stx)
BEGIN   
  stg := stx;          
  return stg;
END;
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 - 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)