# Command: if

NEST HelpDesk | Command Index | NEST Quick Reference

Name:

    if - conditionaly execute a procedure

Synopsis:

      boolean {procedure} if ->	-
      boolean   anytoken  if ->	-

Description:

    if executes the supplied token if the boolean
      is true. The supplied token usually is a procedure.

      Alternatives: Function if_ (undocumented)
      -> behaviour and synopsis are the same, except that no
      warnings or error messages are thrown.

      Examples:  1 0 gt { (1 > 0) = } if -> (1 > 0)

SeeAlso:

- ifelse

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