diagrama

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: http://blogs.msdn.com/b/smallbasic/archive/2013/08/10/small-basic-control-statements-featured-article.aspx
Small Basic: Control Statements
Enjoy!
- Ninja Ed

Deja un comentario