Post Reply 
Global Variables?
08-19-2021, 04:50 AM (This post was last modified: 08-19-2021 04:51 AM by cahlucas.)
Post: #15
RE: Global Variables?
(08-18-2021 09:55 AM)toml_12953 Wrote:  
(08-18-2021 04:37 AM)cahlucas Wrote:  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.

Strange... I get a SYNTAX ERROR at the first LOCAL.

Dear Tom,
That's strange... Did you enter the program exactly as I did? The LOCAL statement must be within the BEGIN and END; words, and terminated with a ;. What can also matter is whether you use a G1 or a G2. Another hint: put the following on the first line of your program: # pragma mode(separator(.,;) integer(h32)) (first a period, then a comma, and finally a semicolon). I hope it works now. Sincerely, Karel.

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)