YENGbreak: Difference between revisions

From OpenSimulator
Jump to navigationJump to search
imported>Djphil
m Add pre html tag
imported>Djphil
m Remplace pre by source
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 )


<pre>
<source lang="lsl">
string error = "";
string error = "";


Line 18: Line 18:
     break;
     break;
}
}
</pre>
</source >


[[Category:Scripts]]
[[Category:Scripts]]

Revision as of 14:41, 22 September 2020

break can be used to jump out of do...while, while and for() loops ( or case clauses )

string error = "";

while(true)
{
    if(blabla)
    {
        error = "blabla";
        break;
    }
    if(bla)
    {
        error = "bla";
        break;
    }
    break;
}