Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 exptools 1/6/84; site ihnss.UUCP
Path: utzoo!watmath!clyde!floyd!harpo!ihnp4!ihnss!knudsen
From: knudsen@ihnss.UUCP
Newsgroups: net.micro.6809
Subject: Global or Own Vars in BASIC09?
Message-ID: <1933@ihnss.UUCP>
Date: Fri, 17-Feb-84 18:51:28 EST
Article-I.D.: ihnss.1933
Posted: Fri Feb 17 18:51:28 1984
Date-Received: Sat, 18-Feb-84 04:33:09 EST
Organization: AT&T Bell Labs, Naperville, IL
Lines: 15

Is there any decent way to simulate global variables in B9?
I want variables that any procedure can modify, whereupon that
change is visible to all other procedures, including the main program.
So far, all I can see is to put all such variables in one structure (type) and
then pass that as an argument down the calling chain, instead of many
single variables.  Am I missing anything in the manual?
	Also, is there any way to get Static or Own variables, ie,
locals that retain their values from the previous activation of their
procedure?  These are very useful.  Must I use the same structure trick?
I know that B9 does not initialize locals on each call, but you wouldn't
dare assume they retained the previous value, due to dynamic allocation
of variable space.
	Any better ideas?  Mike k
PS: I got a PhD in CS from CM-U, so have heard the party line about
"globals considered harmful", tho not from any profs who were writing code.