Conditional structures: Difference between revisions
→Else and elif: there really is no need to use semicolons if we plan on writing several lines anyway
imported>Tromp (Conditional structures in BLC) |
(→Else and elif: there really is no need to use semicolons if we plan on writing several lines anyway) |
||
Line 8,030:
There are optional <code>elif</code> (else if) and <code>else</code> clauses.
<syntaxhighlight lang="sh">if test 4 -ge 6
elif test 4 -lt 6
▲ echo '4 compares not to 6'
fi</syntaxhighlight>
|