Name | forseq_in_step_do_
|
Definition | forseq (v:var(scalar)) in (r:val(range(scalar))) step (s:val(int)) do (e:expr(void)) : expr(void)
|
Example | forseq i in 0 to 9 step 2 do print(i)
|
Defined in | ctrl.l
|
Implementation | lard
|
Infix | forseq_in_step_do_ : infix(60,none).
|
Description | Evaluate body expression once for each value of the variable between the left and right values stepping by s places of
the range r (inclusive) if left_index < right_index. If left_index >= right_index then forseq_in_step_do_
does nothing. Only index values within the given range are considered i.e. in the above example 02468 is printed.
For negative values of s left_index must be greater or equal to right_index for the loop body to be executed
at least once. If s < 0 and left_index < right_index or if s = 0 then forseq_in_step_do_ does nothing.
|