Command: getenv

NEST HelpDesk Command Index NEST Quick Reference

Name:
 getenv - evaluates if a string is an evironment variable

Synopsis:
 string getenv -> path true
string getenv -> false

Description:
 getenv checks if the string is an environment variable. If
this is the case the path of the variable and true is pushed on the stack,
otherwise a false is pushed on the stack and the string is lost.

Examples:

SLI ] (HOME) getenv
SLI [2] pstack
true
(/home/gewaltig)

SLI ] (NONEXISTING) getenv =
false

SLI ] (SLIDATADIR) getenv
SLI [2] { (Using root path: )  =only = }
SLI [3] { (Warning: $SLIDATADIR undefined) =}
SLI [4] ifelse
Using root path: /home/gewaltig/nest/release/release

SLI ] (/home) getenv
false

Remarks:
 if getenv is used with the wrong argument (e.g. integer), 
the SLI Session is terminated

Author:
 docu by Marc Oliver Gewaltig and Sirko Straube

SeeAlso:environment
Source:
 /home/abuild/rpmbuild/BUILD/nest-2.4.1/sli/slistartup.cc

NEST HelpDesk Command Index NEST Quick Reference

© 2000-2010 The NEST Initiative