YENGcontinue

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Created page with "continue allows to skip into next step on do...while, while and for loops for(integer i = 0; i< 5; i++) { if(i == 4) //skip 4 continue; doSomething(i); }")
 
m (Line number clarification)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
continue allows to skip into next step on do...while, while and for loops
+
Continue allows to skip into next step on do...while, while and for loops.
 +
Make sure to add yoptions; to the second line of the script, usually line number 1 starting from 0.
 +
<source lang="lsl">
 +
for(integer i = 0; i < 5; i++)
 +
{
 +
    if(i == 3) // skip 3
 +
        continue;
 +
    doSomething(i);
 +
}
 +
</source >
  
for(integer i = 0; i< 5; i++)
+
[[Category:Scripts]]
{
+
  if(i == 4) //skip 4
+
      continue;
+
  doSomething(i);
+
}
+

Latest revision as of 15:03, 16 March 2021

Continue allows to skip into next step on do...while, while and for loops.

Make sure to add yoptions; to the second line of the script, usually line number 1 starting from 0.
for(integer i = 0; i < 5; i++)
{
    if(i == 3) // skip 3
        continue;
    doSomething(i);
}
Personal tools
General
About This Wiki