Check out another great article from Nonki:
Small Basic: Control Statements
Here's an excerpt from it:
If statement
If statement or If clause is for making conditional branch. If you'd like to show "AM" or "PM" by checking clock, following code and chart are for that. There is another keyword "ElseIf" for this clause. For detail about "ElseIf", see the next section.
' Start
hour
=
Clock
.
Hour
' Get hour
If
hour
<
12
Then
' hour < 12?
TextWindow
.
WriteLine
(
"AM"
)
' Yes: Write "AM"
Else
TextWindow
.
WriteLine
(
"PM"
)
' No: Write "PM"
EndIf
' End
============================
And check out the full article here:
Small Basic: Control Statements
Enjoy!
- Ninja Ed