#include <stdlib.h>
#include <stdio.h>
#include "../command.h"
Go to the source code of this file.
Functions | |
static int | IsTrue (VARIABLE v) |
COMMAND (SLIF) | |
if (!IsTrue(ItemResult)) | |
while (1) | |
END | SETPROGRAMCOUNTER (PARAMETERNODE) |
Variables | |
END NODE | nItem |
NODE | nGoForward |
NODE | nCode |
VARIABLE | ItemResult |
END END | NEXTPARAMETER |
|
IF =section misc =title IF condition THEN Conditional execution. There are two different ways to use this command: single line T<IF> and multi line T<IF>. A single line T<IF> has the form =verbatim IF condition THEN command =noverbatim There is no way to specify any T<ELSE> part for the command in the single line version. If you need T<ELSE> command you have use multi line T<IF>. The multi line T<IF> should not contain any command directly after the keyword T<THEN>. It should have the format: =verbatim IF condition THEN commands ELSE commands END IF =noverbatim The T<ELSE> part of the command is optional, thus the command can have the format =verbatim IF condition THEN commands END IF =noverbatim as well. To be very precise the full syntax of the multi-line T<IF> command is: =verbatim IF condition THEN commands [ ELSE IF | ELSEIF | ELSIF | ELIF commands ... ] [ ELSE commands ] END IF | ENDIF =noverbatim You can use as many T<ELSE IF> branches as you like and at most one T<ELSE> branch. The keywords T<ELSE IF>, T<ELSEIF> and others are allowed for ease program porting from other BASIC dialect. There is no difference between the interpretation. The same is true for T<END IF> in two words and written into a single keyword T<ENDIF>. |
|
Definition at line 129 of file if.c. References RETURN, and SETPROGRAMCOUNTER(). |
|
Definition at line 30 of file if.c. References LONGVALUE(), memory_IsUndef(), and STRINGVALUE(). Referenced by while(). |
|
|
|
Definition at line 156 of file if.c. References ASSERTOKE, IsTrue(), NEXTPARAMETER, OPCODE, pEo, RETURN, and SETPROGRAMCOUNTER(). |
|
|
|
|
|
|
|
|
|
|