qp.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
EnvStr Function
  Summary Details Example                                   Back
 
  Argument
 
    index     Number of desired environment variables
 
  Returns
 
    STRING    Environment variable corresponding to a given index
 
  Description
 
    The EnvStr function returns a DOS environment variable
    corresponding to a given index. DOS stores environment strings in
    memory. The index to the first environment string is one.
 
    The returned string contains an environment variable name, an equal
    sign (=), and the string associated with the variable.
 
    For example, if the first environment variable contains the setting
    PATH=C:\;C:\QP, EnvStr returns the string 'PATH=C:\;C:\QP' from
    the following call:
 
       result := EnvStr( 1 );
 
    EnvStr returns an empty string if the index is less than one or
    greater than the number of strings in the environment. The EnvCount
    function reports the number of strings currently contained in the
    DOS environment.
 
    Use the GetEnv function to return the value of an environment
    variable passed as a string.
 
    Consult a DOS manual for further information about the DOS
    environment and the environment variables.