05.B Control and Logic Commands

 

If <test> Then

Else

ElseIf

End if

tests an expression and executes statements depending on the result of the test

Do [while|until]

Loop

Exit Do

repeats a series of statements until some test ends the execution

For

Next

Exit For

repeats execution of a series of statements and increments a control variable on each execution

GoTo

transfers control to a section of statements identified by a label

Gosub

Return

transfers control to a section of code and returns

NextForm

Changes the displayed form to a different form.

Select Case

   Case

   Case Else

End Select

tests a variable's value and executes selected statements depending on the value

Stop

Stops program execution