IF ... THEN ... ELSE ... ENDIF

Previous  Next

 

IF condition THEN

   statements

ELSE IF condition THEN

   statements

ELSE

   statements

ENDIF

 


 

Standard IF THEN ELSE ENDIF.  Note; that it ends with an ENDIF rather than END IF.  Future enhancement will add END IF

 

Example:

 

IF Month = 5 THEN

  IF Today = 21 THEN

     PRINT "Today is May 21st"

  ELSE

     PRINT "I think it's May ?"

  ENDIF

ELSE IF Month = 1 THEN

  PRINT "First Month of the Year"

ELSE

  PRINT "To bad..."

ENDIF