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

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

on other few tests i tried, the same happened on "end if"
Reply
#2
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)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)