|
Post by rikky on Dec 21, 2020 15:43:02 GMT 1
Hello. I have this nice little program, that seems to work. DECLARE variable$ ASSOC STRING
variable$("bla") = "something" variable$("blabla") = "something" variable$("bla" & "blabla") = "something"
PRINT variable$("blablabla") PRINT variable$("blabla" & "bla") response: something something
Apparently you can combine all kinds of strings to the eventual string in your ASSOC variable. But not so in the PRINT FORMAT: Following works: PRINT VAL("1") + VAL("1") FORMAT "%.2f" TO variable$("blablabla") PRINT variable$("blab" & "labla") response: 2.00 But the next doesn't. PRINT VAL("1") + VAL("1") FORMAT "%.2f" TO variable$("bla" & "blabla") response: test.bac:19:0: error: unterminated argument list invoking macro "__b2c__hash_add_str" Rik.
|
|
|
Post by Pjot on Dec 21, 2020 18:55:17 GMT 1
Hi rikky, Well, you're ahead of me As you may have noticed from the repo comments, I am in the process of changing the code for argument handling in statements. I already observed it can lead to problems in some circumstances. But I did not reach to the PRINT argument handling yet, but I have done so just now and uploaded the fix to the fossil repo. Interestingly, the problem did not occur in the Shell version of BaCon. Thanks, Peter
|
|