NEXT: Difference between revisions

From Macros Wiki
Jump to navigationJump to search
ConnerO (talk | contribs)
New page: {{Command|syntax=NEXT <variable> |description=*DESCRPTION* |param1=<variable>|param1_desc={{variable}} }} ===Example=== :- NEXT Category:Language
 
MikeO (talk | contribs)
No edit summary
Line 1: Line 1:
{{Command|syntax=NEXT <variable>
{{Command|syntax=NEXT <variable>
|description=*DESCRPTION*
|description=The NEXT command is used in conjunction with the [[FOR]] command to indicate the end of a loop.


|param1=<variable>|param1_desc={{variable}}
|param1=<variable>|param1_desc={{variable}}
Line 6: Line 6:


===Example===
===Example===
:- NEXT
:FOR I=1 TO 3
:(some macro commands)
:NEXT I
<br>
:You can "nest" loops (one loop inside another)
<br>
:FOR I=1 TO 3
:  FOR J=2 TO 8
:    (some macro commands)
:  NEXT J
:NEXT I
<br>
:It is recommended that you indent code inside loops to help show where a loop starts and ends
 


[[Category:Language]]
[[Category:Language]]

Revision as of 21:33, 26 July 2010

Command

NEXT <variable>


The NEXT command is used in conjunction with the FOR command to indicate the end of a loop.

Parameters

<variable>
Define a custom variable to be used later in the macro, for example "w1".

Example

FOR I=1 TO 3
(some macro commands)
NEXT I


You can "nest" loops (one loop inside another)


FOR I=1 TO 3
FOR J=2 TO 8
(some macro commands)
NEXT J
NEXT I


It is recommended that you indent code inside loops to help show where a loop starts and ends