Post Reply 
Global Variables?
08-19-2021, 08:57 AM (This post was last modified: 08-19-2021 09:08 AM by toml_12953.)
Post: #16
RE: Global Variables?
(08-19-2021 04:50 AM)cahlucas Wrote:  
(08-18-2021 09:55 AM)toml_12953 Wrote:  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(.,Wink integer(h32)) (first a period, then a comma, and finally a semicolon). I hope it works now. Sincerely, Karel.

Yes, I entered it exactly by copying and pasting the code onto my G2. I'll try the pragma ... OK, I just tried the pragma and still get a syntax error at the same place. Here's what I have:
Code:
#pragma mode(separator(.,;) integer(h32))
BEGIN
 LOCAL R;
 R:=MAKEMAT(1,100);
END;
EXPORT test()
  PRINT(R(10));
END;

Tom L
Cui bono?
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: 1 Guest(s)