Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,80 @@
|
|||
' Boolean Evaluations
|
||||
'
|
||||
' > Greater Than
|
||||
' < Less Than
|
||||
' >= Greater Than Or Equal To
|
||||
' <= Less Than Or Equal To
|
||||
' = Equal to
|
||||
|
||||
x = 0
|
||||
|
||||
if x = 0 then print "Zero"
|
||||
|
||||
' --------------------------
|
||||
' if/then/else
|
||||
if x = 0 then
|
||||
print "Zero"
|
||||
else
|
||||
print "Nonzero"
|
||||
end if
|
||||
|
||||
' --------------------------
|
||||
' not
|
||||
if x then
|
||||
print "x has a value."
|
||||
end if
|
||||
if not(x) then
|
||||
print "x has no value."
|
||||
end if
|
||||
|
||||
' --------------------------
|
||||
' if .. end if
|
||||
if x = 0 then
|
||||
print "Zero"
|
||||
goto [surprise]
|
||||
end if
|
||||
wait
|
||||
|
||||
if x = 0 then goto [surprise]
|
||||
print "No surprise."
|
||||
wait
|
||||
|
||||
[surprise]
|
||||
print "Surprise!"
|
||||
wait
|
||||
|
||||
' --------------------------
|
||||
' case numeric
|
||||
num = 3
|
||||
|
||||
select case num
|
||||
case 1
|
||||
print "one"
|
||||
|
||||
case 2
|
||||
print "two"
|
||||
|
||||
case 3
|
||||
print "three"
|
||||
|
||||
case else
|
||||
print "other number"
|
||||
|
||||
end select
|
||||
|
||||
' --------------------------
|
||||
' case character
|
||||
var$="blue"
|
||||
|
||||
select case var$
|
||||
|
||||
case "red"
|
||||
print "red"
|
||||
|
||||
case "green"
|
||||
print "green"
|
||||
|
||||
case else
|
||||
print "color unknown"
|
||||
|
||||
end select
|
||||
Loading…
Add table
Add a link
Reference in a new issue