Argox PA-20 Basic Programming Manual Uživatelský manuál Strana 19

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 143
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 18
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.
Zobrazit stránku 18
1 2 ... 14 15 16 17 18 19 20 21 22 23 24 ... 142 143

Komentáře k této Příručce

Žádné komentáře