|
MENU
Dec 17, 2022 9:42:42 GMT -5
Post by Walt Decker on Dec 17, 2022 9:42:42 GMT -5
Seems I have run into another parser glitch. Given:
' '<============================================================> ' Parser balks on "SAVE AS" but not on "FILES" ' Both "FILES" and "AS" are key words '<============================================================> MENU #FORM1, FILES, NEW, F.NEW, LOAD, F.LOAD, SAVE, F.SAVE, SAVE AS, F.SAVEAS
OPEN "TEST" FOR WINDOW AS #FORM1 PRINT #FORM1, "TRAPCLOSE CLOSE.FORM1" WAIT
'--------------------------------- '---------------------------------
SUB CLOSE.FORM1 FormHndl$
CLOSE FormHndl$ END
END SUB '
|
|
|
MENU
Dec 17, 2022 12:42:29 GMT -5
Post by Walt Decker on Dec 17, 2022 12:42:29 GMT -5
MENU #FORM1, FILES, NEW, F.NEW, OPEN, F.OPEN, SAVE, F.SAVE, SAVE AS, F.SAVEAS
Further investigation indicates that the parser will throw a syntax error even if "SAVE AS" is changed to "SAVE &AS".
In addition if "FILES" is changed to "&FILES" and "SAVE AS" is changed to SAVEAS the parser throws a syntax error on "&FILES".
"OPEN" is also a key word, but the parser passes over that with no complaint. However, if "OPEN" is changed to "&OPEN", a syntax error will result.
|
|
|
Post by tsh73 on Dec 17, 2022 14:42:53 GMT -5
I believe correct form is to use quoted strings
MENU #FORM1, "FILES", "NEW", F.NEW, "LOAD", F.LOAD, "SAVE", F.SAVE, "SAVE AS", F.SAVEAS
|
|
|
MENU
Dec 17, 2022 16:13:59 GMT -5
Post by Walt Decker on Dec 17, 2022 16:13:59 GMT -5
That is correct. However, then parser will not throw a syntax error if the "SAVE AS" is changed to something else and the app will execute with not problem. So there is still a glitch in the parser.
|
|