diff --git a/index.html b/index.html index 1a5de25..0ff6339 100644 --- a/index.html +++ b/index.html @@ -210,7 +210,7 @@ llOwnerSay("Program version " STRINGIFY(VERSION)
case
labels can't appear in nested blocks. That's because they are replaced by LSL labels, and as discussed in the Multiple labels with the same name section above, label scope rules prevent their visibility in an outer block, so once converted to labels, the corresponding jump
instructions would not be able to find them. This limitation means that Duff's device or similar constructs can't be implemented with this optimizer.switch()
needs to be followed by a block, not by a single statement. For example, whiile this works in C, it won't work in this optimizer: switch(1) case 1: break;
-case
is treated by this parser as a statement, rather than as a label prefix, making break
be outside the switch
and failing at that point. This limitation is probably only of theoretical importance and will not have any practical implication, since single-statement switch
clauses are of little or no practical use (known to the author). Of course it works perfectly when enclosed in braces:case
is treated by this parser as a statement, rather than as a label prefix, making break
be outside the switch
and thus failing at that point. This limitation is probably only of theoretical importance and will not have any practical implication, since single-statement switch
clauses are of little or no practical use (known to the author). Of course it works perfectly when enclosed in braces: switch(1) { case 1: break; }