Commands for decision structures, 2 commands for decision structures – Argox PA-20 Basic Programming Manual User Manual
Page 19

PT-Basic Programming Manual Ver. 1.00
18/143
3.2 Commands for decision structures
IF … THEN … {ELSE IF…} [ELSE…] END IF
Purpose: To provide a decision structure for multiple-line conditional
execution.
Syntax: IF condition1 THEN [statements1] {ELSE IF condition2
THEN statements2} [ELSE elsestatements] END IF
Example: PRINT "Input a number:"
Result%=INPUT("",K%)
IF K% < 10 THEN
PRINT "One digit"
ELSE IF K% < 100 THEN
PRINT "Two digits"
ELSE
PRINT "Over one Hundry!"
END IF
Description: condition is a logical expression.
statements can be multiple lines of BASIC statements.