If Statements are like Rollercoasters

If Statements are like Rollercoasters

Think of the If statement as a detour in the flow of a program. It’s like an optional roller coaster loop (see Figure below). At some point in the program, the If condition’s checked. If it’s true, Small Basic runs the statements that are between the If and the EndIf keywords and continues its path. But if it’s false, Small Basic skips those statements.

Figure: The flow of an If statement

 

But you don't have to be tall to go on this roller coaster!

Head to https://blogs.msdn.com/smallbasic to learn more about Small Basic!

Have a Small and Basic week!

   - User Ed & Majed Marji