Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
bug on "if", "end if", etc.?
when trying to compile this code on 1.8.8:
dim i as ubyte
if i>2 then:
  print "3>2"
  end if

i get this error message when compiling
endifbug.bas:5: Syntax Error. Unexpected token 'IF' <IF>

on other few tests i tried, the same happened on "end if"
Sorry, Nitro, I completely overlooked this post Sad

It turns out you cannot use ":" after then if you want a block-sentence if. The syntax was changed on 1.6.x
":" Colon after then means you have to finish the IF in the same line like in traditional BASIC (so remove it there to allow the program to compile)

Forum Jump:

Users browsing this thread: 1 Guest(s)