(octave.info)Environment Variables


Next: Current Working Directory Prev: Process ID Information Up: System Utilities
Enter node , (file) or (file)node

36.7 Environment Variables
==========================

 -- : getenv (VAR)
     Return the value of the environment variable VAR.

     For example,

          getenv ("PATH")

     returns a string containing the value of your path.

     See also: Note: setenv, Note: unsetenv.

 -- : setenv (VAR, VALUE)
 -- : setenv (VAR)
 -- : putenv (...)
     Set the value of the environment variable VAR to VALUE.

     If no VALUE is specified then the variable will be assigned the
     null string.

     See also: Note: unsetenv, Note: getenv.

 -- : STATUS = unsetenv (VAR)
     Delete the environment variable VAR.

     Return 0 if the variable was deleted, or did not exist, and -1 if
     an error occurred.

     See also: Note: setenv, Note: getenv.

 -- : HOMEDIR = get_home_directory ()
     Return the current home directory.

     On most systems, this is equivalent to ‘getenv ("HOME")’.  On
     Windows systems, if the environment variable ‘HOME’ is not set then
     it is equivalent to ‘fullfile (getenv ("HOMEDRIVE"), getenv
     ("HOMEPATH"))’

     See also: Note: getenv.


automatically generated by info2www version 1.2.2.9