Harbour Reference Guide

 

GETENV()

Obtains system environmental settings.

Syntax

GETENV(<cEnviroment>, <cDefaultValue> ) --> <cReturn>

Arguments

<cEnviroment> Enviromental variable to obtain.

<cDefaultValue> Optional value to return if <cEnvironment> is not found.

Returns

<cReturn> Value of the Environment Variable.

Description

This function yields a string that is the value of the environment variable <cEnviroment>, which is stored at the system level with the Set command. If no environment variable can be found, the value of the function will be <cDefaultValue> if it is passed, else an empty string.
Examples
      ? QOUT(GETENV('PATH'))
      ? QOUT(GETENV('CONFIG'))
      ? QOUT(GETENV('HARBOURCMD', '-n -l -es2'))
Status

Ready

Compliance

This command is Ca-Clipper compliant. The <cDefaultValue> parameter is a Harbour extension.

Platforms

All

Files

source/rtl/gete.c Library is rtl

 




[Source Forge]

Other Docs Categories

Advantage Database RDD
Array
Binary conversion
Classes
Code Block
Console input
Conversion
Conversion Tools
DOS
Data input and output
Database
Database Tools
Date
Dos Tools
Environment
Error recovery
Events
File management
GT
Harbour Tools
Internal
Low Level
Math
Misc
Miscellaneous
Nation
Object manipulation
Operating System Specific
Parameter Checks
String Tools
Strings
TBrowse Method
TBrowse class
Terminal
Time
Utility
Variable Management

 

Last updated on 2001/07/30