Lasso Soft Inc. > Home

[ sys_getenv ]

Method

This method corresponds to the system's getenv(const char*) function. The parameter it accepts indicates the name of the environment variable whose value should be retrieved. If the indicated environment variable is found, the value is returned as a string object. If the variable is not found, void is returned to indicate that the variable did not exist.

Check your operating system's documentation for the exact behavior of this function.

  • Syntax
sys_getenv(string)
Examples
  • Intermediate

Retrieve the PATH environment variable.

Code

sys_getenv('PATH')

Result

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:~/bin
This result will vary

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft