Conditions

case value
// after case, all blocks can follow in any order

Blocks

of 10
 …
end

of “string”
 …
end


if 1<0
// after if, all blocks can follow in any order

Blocks

if.then
 …
end

if.else
 …
end

thenend
elseend
if.trueend
if.falseend

Different conditions for different types

// for boolean expressions (conditions -> 1<0 or 10=mylength)
if condition … // or ifall condition … // a and b and …
ifnot condition … // or ifnotall condition … // ¬a and ¬b and …
ifone condition … // a or b or …
ifnotone condition … // ¬a or ¬b or …

// for values
ifsmaller 1 2
ifequal 2 2
ifbigger 5 3

// for strings or variables
ifempty string
ifnotempty string
ifcontain pattern string … // ifallcontain pattern string
ifnotcontain pattern string … // ifnotallcontain pattern string
ifonecontain pattern string
ifnotoneconatin pattern string

// for files and dirs
ifexists file
ifnotexists file
iffilesize file size