YENGbreak: Difference between revisions
From OpenSimulator
Jump to navigationJump to search
imported>Djphil m Remplace pre by source |
imported>Djphil No edit summary |
||
| Line 1: | Line 1: | ||
break can be used to jump out of do...while, while and for() loops ( or case clauses ) | break can be used to jump out of do...while, while and for() loops ( or case clauses ) | ||
Make sure to include yoptions; on second line of script. | |||
<source lang="lsl"> | <source lang="lsl"> | ||
string error = ""; | string error = ""; | ||
Revision as of 22:30, 20 November 2020
break can be used to jump out of do...while, while and for() loops ( or case clauses )
Make sure to include yoptions; on second line of script.
string error = "";
while(true)
{
if(blabla)
{
error = "blabla";
break;
}
if(bla)
{
error = "bla";
break;
}
break;
}