Command: for

NEST HelpDesk Command Index NEST Quick Reference

Name:
 for - execute a procedure for a sequence of numbers
Synopsis:
 n1 s n2 proc for -> -
Description:
   for repeatedly evaluates the supplied procedure for all
   values from n1 to n2 in steps of s. In each iteration
   proc is called with the current iteration counter as
   argument.
   The loop can be quit prematurely by calling exit.
   If the value of the iteration counter is not needed,
   use repeat instead.
Examples:
SLI ] 1 1 10 {=} for
1
2
3
4
5
6
7
8
9
10
SLI ]
SeeAlso:repeat exit loop
Source:
 /home/abuild/rpmbuild/BUILD/nest-2.4.1/sli/slicontrol.cc

NEST HelpDesk Command Index NEST Quick Reference

© 2000-2010 The NEST Initiative