Chapter 16: Programming 437
If
IfIf
If
Use If for testing and branching. If condition is false (zero), then the command immediately
following If is skipped. If condition is true (nonzero), then the next command is executed. If
instructions can be nested.
:If condition
:command (if true)
:command
If-Then
If-ThenIf-Then
If-Then
Then following an If executes a group of commands if condition is true (nonzero). End
identifies the end of the group of commands.
:If condition
:Then
:command (if true)
:command (if true)
Program Output