Difference between revisions of "CONTINUE"

From Macros Wiki
Jump to: navigation, search
(New page: {{Command|syntax=CONTINUE |description=*DESCRPTION* |param1=|param1_desc={{No Parameters}} }} ===Example=== :- CONTINUE Category:Language)
 
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[:Category:Language|{{Up}}]]
 +
 
{{Command|syntax=CONTINUE
 
{{Command|syntax=CONTINUE
|description=*DESCRPTION*
+
|description=:This commands is used inside a [[FOR]] / [[NEXT]] loop to increment the loop variable and jump back to the start of the loop (or to jump to the end of the loop, if the loop variable has reached the loop end value). the result is the same as using a [[GOTO]] command to jump to a label immediately before the [[NEXT]] command.
  
 
|param1=|param1_desc={{No Parameters}}
 
|param1=|param1_desc={{No Parameters}}
Line 6: Line 8:
  
 
===Example===
 
===Example===
:- CONTINUE
+
:FOR ToolNum = 3 TO 8
 +
:  GET_TOOL_DATA ToolNum, MTOOL_DIA, dia
 +
:  IF dia < 3 THEN GOTO Small
 +
:  IF dia < 6 THEN GOTO Medium
 +
:  IF dia < 9 THEN GOTO Big
 +
CONTINUE
 +
:<nowiki>:</nowiki>Small
 +
:Message "Small"
 +
:CONTINUE
 +
:<nowiki>:</nowiki>Medium
 +
:Message "Medium"
 +
:CONTINUE
 +
:<nowiki>:</nowiki>Big
 +
:Message "Big"
 +
:NEXT ToolNum
 +
 
 +
:For an example macro see [[Modify_op_path2]]
 +
 
  
 
[[Category:Language]]
 
[[Category:Language]]

Latest revision as of 19:01, 3 January 2011

Up

Command

CONTINUE


This commands is used inside a FOR / NEXT loop to increment the loop variable and jump back to the start of the loop (or to jump to the end of the loop, if the loop variable has reached the loop end value). the result is the same as using a GOTO command to jump to a label immediately before the NEXT command.

Parameters

No Parameters

Example

FOR ToolNum = 3 TO 8
GET_TOOL_DATA ToolNum, MTOOL_DIA, dia
IF dia < 3 THEN GOTO Small
IF dia < 6 THEN GOTO Medium
IF dia < 9 THEN GOTO Big
CONTINUE
:Small
Message "Small"
CONTINUE
:Medium
Message "Medium"
CONTINUE
:Big
Message "Big"
NEXT ToolNum
For an example macro see Modify_op_path2