' Start
hour
=
Clock
.
Hour
' Get hour
If
<
12
Then
' hour < 12?
TextWindow
WriteLine
(
"AM"
)
' Yes: Write "AM"
Else
"PM"
' No: Write "PM"
EndIf
' End
1.
2.
start
:
3.
Write
"1+1=2 Y/N? "
' Write "1+1=2 Y/N? "
4.
Read
' Read ans
5.
ans
"Y"
' ans?
6.
"True"
' "Y": Write "True"
7.
ElseIf
"N"
8.
"False"
' "N": Write "False"
9.
10.
Goto
' other: input again
11.
12.
n
0
i
2
While
10
+
EndWhile
' Write n
For
To
Step
EndFor
A
' Call A
Sub
"A"
' Write "A"
EndSub
' Return
Nonki Takahashi edited Revision 17. Comment: Added link to "Small Basic: The 14 Keywords"
Excellent article, why didn't you use your own code formatter?
Thanks, litdev. This article was written before I developed the code formatter. Anyway, code blocks have been little broken after I wrote them. So, I will update them with my code formatter.