Previous Topic: EnvGetFirst - Retrieve the Name of the First Environment VariableNext Topic: EnvGetString - Retrieve the Value of an Environment Variable


EnvGetNext - Retrieve the Name of the Subsequent Environment Variables

Valid on UNIX and Windows

The EnvGetNext function continues the EnvGetFirst function, retrieving the name of subsequent environment variables. For each call of EnvGetNext, one environment variable name is returned until no more environment variables are found.

Function format:

EnvGetNext() as string

The return value is a string containing the name of an environment variable. If no more environment variables exist, an empty string is returned.

Example:

This example displays all the environment variable names

Dim txt as String

txt = EnvGetFirst()
While txt <> ""
 Print(txt)	
 txt = EnvGetNext()
Wend