If / Then ( ステートメント )
INPUT “MARKS”, M IF M<75 THEN PRINT “ADMIT” END IF
Format
if boolean_expression then statement
if boolean_expression then statement else statement
if boolean_expression then compound_statement
if boolean_expression then compound_statement else compound_statement
if boolean_expression then
statement(s)
end if
if boolean_expression then
statement(s)
else
statement(s)
end if
説明
例
print "Guess my letter - press a key"
# wait for the user to press a key
do
a = key
pause .01
until a <> 0
#
if chr(a) = "Z" then
print "Yippie, you pressed the Z key!!!"
else
print "darn, you pressed something else."
end if
#
end
History
0.9.4g | Multiple line If/Then/Else/EndIf |
1.1.0.0 | Added single line If/Then/Else |
コメント
最新を表示する
NG表示方式
NGID一覧