IF, THEN, ELSE

Top  Previous  Next

Keyword Description

Logical

Class

Statement

Where Legal

Resources

Entry Logic

Exit Logic

Initial Size

Resize

(Pre-Category)

Resize

(Category-Level)

l

l

l

l

l

l

Syntax

IF condition THEN statement ELSE other statement

IF condition THEN action ELSE other action

 

Example

Sample code

IF COL3 > 30 THEN BUYSTOP = COL1 ELSE BUYSTOP = COL2

' conditionally assigns a Buy Stop value

Sample code

IF COL3 > 30 THEN COL2 = COL2 + COL2[1]; X = X + 1; MEMORY[33] = MEMORY[33] + 1

' When separated by a semicolon multiple statements can execute as the 

' result of an IF..THEN.. decision