Keil Logo Arm Logo

A166 User's Guide

ELSEIF Assembler Statement

Arguments
ELSEIF expression
Description

The ELSEIF statement begins an alternate block after an IF or ELSEIF statement. The ELSEIF block is assembled only if the specified expression is evaluated and the value is non-zero (TRUE). If the expression is zero (FALSE), the ELSEIF block is not assembled and subsequent blocks of the IF-ELSE-ENDIF construct are evaluated.

ELSEIF blocks are terminated by an ELSEIF, ELSE, or ENDIF statement.

Note

  • The specified expression may not contain symbols defined with the SET and RESET directives.
  • Do not confuse the ELSEIF statement with the $ELSEIF directive. They are not equivalent and they may not be used with the same symbols.
See Also

ELSE, ENDIF, EQU, IF, LIT, SET

Example
IF (SWITCH = 1)
.
.
.
ELSEIF (SWITCH = 2)
.
.
.
ELSE
.
.
.
ENDIF

arm-logo-small

Keil logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.