# 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 ->	-

Examples:

      SLI ] 1 1 10 {=} for
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      SLI ]

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.

SeeAlso:

- repeat
- exit
- loop

Source:

    /opt/conda/conda-bld/nest_1524088722951/work/nest-2.14.0/sli/slicontrol.cc

NEST HelpDesk | Command Index | NEST Quick Reference

© 2004 The NEST Initiative