Menu

#1403 Parsing error with if-keyword statement

None
invalid
nobody
None
none
1
2016-09-21
2016-09-21
No

While experimenting with using the variable "if" as the expression in an if-keyword statement, the following code works as expected:

if=1
if if then say "if=1"

whereas the following code (variable "then" as the expression) causes an error "35.929: Missing expression in logical expression list.":

  then=1
  if then then say "then=1"

Discussion

  • Rick McGuire

    Rick McGuire - 2016-09-21
    • status: open --> invalid
     
  • Rick McGuire

    Rick McGuire - 2016-09-21

    This is the correct result. IF is not a sub-keyword of the IF instruction, so using that as a variable name in the test expression has no effect. THEN is a sub-keyword of the instruction and acts as the expression terminator.

     

Anonymous
Anonymous

Add attachments
Cancel