Difference between revisions of "GETENV()"

From Lianjapedia
Jump to: navigation, search
(Description)
 
(3 intermediate revisions by 2 users not shown)
Line 3: Line 3:
  
 
==Syntax==
 
==Syntax==
GETENV(<expC>)
+
GETENV(<expC> [,<cDefault>] )
  
 
==See Also==
 
==See Also==
Line 9: Line 9:
  
 
==Description==
 
==Description==
The GETENV() function returns the value of the environment variable <expC>.
+
The GETENV() function returns the value of the environment variable <expC>. If the environment variable does not exist then the default <cDefault> is returned.
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
? getenv("APP_FILE")
+
? getenv("DB_DATADIR")
/usr/recital/patrons.dbf
+
C:\lianja\data\
 
</code>
 
</code>
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Environment]]
 
 
[[Category:Environment Functions]]
 
[[Category:Environment Functions]]

Latest revision as of 03:58, 10 February 2023

Purpose

Function to get environment information

Syntax

GETENV(<expC> [,<cDefault>] )

See Also

ACCESS(), ADDBS(), GETGID(), GETPID(), GETUID(), HOME(), PUTENV()

Description

The GETENV() function returns the value of the environment variable <expC>. If the environment variable does not exist then the default <cDefault> is returned.

Example

? getenv("DB_DATADIR")
C:\lianja\data\