NOTE: This invite-only release of SunSed Alpha is for testing purposes and in no way represents the final quality of the product — join the waitlist (~wait time: 2 weeks). SunSed release date is on March 11, 2022.

IF...ELSE

Conditional statements, tells the program to perform a certain instruction depending on the given condition.

IF

Executes the statement only if the condition is TRUE.

IF (condition) {
    statement
}

ELSE

Executes the alternate statement only if the condition is FALSE.

IF (condition) {
    statement
} ELSE {
    alternate statement 
}

ELSEIF

Executes the alternate statement only if the alternate condition of the ELSEIF is TRUE.

IF (condition) {
    statement
} ELSEIF (alternate condition) {
    alternate statement
}

Example

IF ($x > $y) {
    PRINT "X is bigger than Y"
} ELSEIF ($x === $y) {
    PRINT "X is equal to Y"
} ELSE {
    PRINT "X is smaller than Y"
}
Copyright © SunSed LLC 2013-2021 All rights reserved.