Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>gete()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GETE()


Syntax:     GETE(<expC>)

Purpose:    To retrieve the contents of a DOS environmental variable.

Argument:   <expC> is the name of the DOS environmental variable
            specified completely in upper case.  Note that when an
            environmental variable is SET, it is converted to upper
            case.

Returns:    A character string.

            GETE() returns the contents of the specified DOS
            environmental variable.  If the variable cannot be found,
            GETE() returns a null string ("").

            Note: If you are certain that an environmental variable
            exists and yet GETE() always returns a null string (""), be
            sure there are no spaces between the environmental variable
            name and the first character of the string assigned to it in
            the DOS SET command.

Usage:      GETE() is useful for passing configuration information from
            the DOS environment into an application program.  Typically,
            this could be configuration information that includes paths
            specifying the location of files (database, index, label, or
            reports).  This is particularly useful for network
            environments.

            For example, when you set up a system define environmental
            variables that contain the location of various file types
            along with the CLIPPER environmental variable.  The
            following DOS commands demonstrate:

               C>SET LOC_DBF=<database file path>
               C>SET LOC_NTX=<index file path>
               C>SET LOC_RPT=<report file path>

            In the configuration section of your application program,
            assign the contents of the environmental variables to memory
            variables.  Then when you access a file, preface the
            reference with the path variable as follows:

               loc_dbf = GETE("LOC_DBF")
               USE (loc_dbf + "<alias>")

Library:    EXTEND.LIB


----------------------------------- Example --------------------------------

   path_set = GETE("PATH")
   SET PATH TO (path_set)


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson