Selection statements

Keyword

Example

Description

IF

IF a>=0 AND a<=10 THEN
    b:=0;
    ELSIF a>=100 THEN
        b:=1;
    ELSE
        b:=2;
END_IF;

Divergence depends on the Boolean value of the expression

CASE

CASE a OF
    0:        b:=0;
    1,2:        b:=1;
    3,4,10..20:    b:=2;
    100..110:    b:=3;
    ELSE    b:=4;
END_CASE;

Multiple selection depending on the variable

Modified on: 2021-09-20Feedback on this pagePanasonic hotline