# Command: currentname

NEST HelpDesk | Command Index | NEST Quick Reference

Name:

    currentname -   returns the most recently resolved name

Synopsis:

      currentname -> name true
      -> false

Description:

      currentname returns the most recently resolved name whose contents
      is still under execution.
      currentname is useful for error handling purposes where a procedure
      has to know the name with which it has been called.
      Example:

      /divide
      {
      0 eq
      {
      currentname /DivisionByZero raiseerror
      } if
      div
      } def

      Note:
      This function is not foolproof, as it will fail for bound procedures.

      currentname evaluates certain debugging information on the execution
      stack. Note that the SLI interpreter can be compiled not to generate
      this information. In this case currentname fails, i.e. it will always
      return false

Source:

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

NEST HelpDesk | Command Index | NEST Quick Reference

© 2004 The NEST Initiative