Small Basic – Control Statements (featured article)

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"
  TextWindow.WriteLine("PM")  ' No: Write "PM"
' End





And check out the full article here:

Small Basic: Control Statements




   – Ninja Ed

Comments (1)

  1. Click here for Nonki's blog posts and a lot of other articles and programs of his that we've featured:…/Nonki+Takahashi