Conditional structures: Difference between revisions
Content deleted Content added
m →{{header|Free Pascal / Lazarus}}: Removed unnecessary section |
Added zkl |
||
Line 4,255: | Line 4,255: | ||
<xsl:if test="boolean($expr)">...</xsl:if> |
<xsl:if test="boolean($expr)">...</xsl:if> |
||
<xsl:if test="$expr">...</xsl:if></lang> |
<xsl:if test="$expr">...</xsl:if></lang> |
||
<lang zkl>if (x) y else z; |
|||
if(a)b else if (c) else d; etc |
|||
x:=(if (a) b else c); |
|||
a and b or c // usually the same as if(a) b else c, beware if b evals to False |
|||
switch(x){ |
|||
case(1){...} |
|||
case("2"){...} // matches anything |
|||
case(a)[fallthrough]{...} // no break, no break has to be explicit |
|||
case(b){...} |
|||
else {...} // case a C's default, has to be at the end |
|||
}</lang> |
|||
{{omit from|GUISS}} |
{{omit from|GUISS}} |