HiLMAs reference
Back

Control Instructions

Next

FOR

   FOR var,start,end[,STEP=integer]

 

Description

This is the loop For/Next:
the instructions between FOR and NEXT are repeated by (end - start ) times, and var is the integer variable containing the loop counter; the optional STEP= indicates the step count; the default is 1 and can be a negative constant number. If STEP= is a integer variable, this must contain only a positive value.

 

Parameter specifications

Parameter Name Mode Type coding Remark
1 var Output  Integer F or H Loop counter
2 start Input Integer F or H or const. start must be less then end
3 end Input Integer F or H or const.  
  STEP=integer Input Integer F or H or const.  

 

 


NEXT

Description

This ends the loop For/Next: every FOR statement must be closed by a NEXT statement.

 

Examples

 


Back Start Next
IF / ELSE / ENDIF Top ITERATEF / LEAVEF