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:
 /home/abuild/rpmbuild/BUILD/nest-2.4.1/sli/slicontrol.cc

NEST HelpDesk Command Index NEST Quick Reference

© 2000-2010 The NEST Initiative