MinitScript  0.9.31 PRE-BETA
README-FlowControl-Conditions

LOGO

1. Flow Control - If, elseif and else

If, elseif and else are flow control methods. Please see the usage below.

See an example of if:

...
$i = 1
if ($i == 1)
console.printLine("i -> 1")
end
...

See an example of if and else:

...
$i = 2
if ($i == 1)
console.printLine("i -> 1")
else
console.printLine("else: ", $i)
end
...

See an example of if, elseif and else:

...
$i = 2
console.printLine($i, ":")
if ($i == 0)
console.printLine("i -> 0")
elseif ($i == 1)
console.printLine("i -> 1")
elseif ($i == 2)
console.printLine("i -> 2")
elseif ($i == 3)
console.printLine("i -> 3")
else
console.printLine("else: ", $i)
end
...

2. Links

2.1. Language Documentation

2.2. Other Links