GLBasic Programming/BASIC/IF...THEN...ELSEIF...ELSE

From Wikibooks, open books for an open world
< GLBasic Programming
Jump to: navigation, search

This part is about the commands IF THEN ELSEIF ELSE.

LET number = -3 //Or your own
IF number<0 THEN
  PRINT "Number is negative"
ELSEIF number>0 THEN
  PRINT "Number is positive"
ELSE
  PRINT "Number is zero"
END IF

I hope you got it now.

Previous: BASIC/User Input Index Next: BASIC/WHILE...WEND