Post Reply 
Global Variables?
08-18-2021, 04:37 AM (This post was last modified: 08-18-2021 04:41 AM by cahlucas.)
Post: #13
RE: Global Variables?
(04-03-2017 04:39 PM)toml_12953 Wrote:  
(04-03-2017 10:25 AM)DrD Wrote:  (Second line in your code block):

R is a reserved variable for reals only.

Yes, I know that but my question was - since R:=MAKEMAT(0,100); works for local variables, is there a way to make it local to the current program file but global to all the subprograms in that file. The answer as it turns out is "No"

Tom L

Dear Tom,
Try this code (it works on my G2):
Code:

BEGIN
LOCAL R;
R:=MAKEMAT(1,100):
END;
For all code that follows, the variable R will be global.

I use HP-16C, WP-34S emulator, HP-35s, HP-48GX, HP-50g, and HP Prime G2.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Global Variables? - toml_12953 - 04-03-2017, 12:40 AM
RE: Global Variables? - Joe Horn - 04-03-2017, 02:10 AM
RE: Global Variables? - toml_12953 - 04-03-2017, 02:59 AM
RE: Global Variables? - Han - 04-03-2017, 03:02 AM
RE: Global Variables? - toml_12953 - 04-03-2017, 10:11 AM
RE: Global Variables? - jte - 08-15-2021, 12:27 AM
RE: Global Variables? - Joe Horn - 08-15-2021, 12:49 AM
RE: Global Variables? - jte - 08-15-2021, 01:22 AM
RE: Global Variables? - Joe Horn - 08-15-2021, 03:57 AM
RE: Global Variables? - DrD - 04-03-2017, 10:25 AM
RE: Global Variables? - toml_12953 - 04-03-2017, 04:39 PM
RE: Global Variables? - cahlucas - 08-18-2021 04:37 AM
RE: Global Variables? - toml_12953 - 08-18-2021, 09:55 AM
RE: Global Variables? - cahlucas - 08-19-2021, 04:50 AM
RE: Global Variables? - toml_12953 - 08-19-2021, 08:57 AM
RE: Global Variables? - Stevetuc - 08-19-2021, 03:38 PM
RE: Global Variables? - jte - 01-20-2023, 02:46 AM
RE: Global Variables? - cahlucas - 08-20-2021, 04:04 PM
RE: Global Variables? - toml_12953 - 08-20-2021, 06:26 PM
RE: Global Variables? - compsystems - 04-03-2017, 01:18 PM



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