Okay, the IF statement has two syntax options. IF/THEN and IF/[ELSE]/ENDIF you can use either one, but don't mix them.
IF A > B then PRINT "A Wins!": gosub EndGame
That was a complete IF/THEN statement. The colon allows for multiple statements to be included in the execution 'block'.
IF A > B
PRINT "A Wins!"
gosub EndGame
ENDIF
Same thing, but the execution 'block' is between IF and ENDIF. IF/ENDIF also has an option ELSE statement.
IF A > B
PRINT "A Wins!"
gosub EndGame
ELSE
PRINT "A has not won, keep on playing?"
ENDIF
Also, watch out for this... it will generate a syntax error because the compiler does not know where the ENDIF goes since the IF was associated with the THEN keyword.
IF A > B THEN
PRINT "A Wins!"
gosub EndGame
ENDIF
Clear as mud?
--
TAZ