Difference between revisions of "PUTENV()"

From Lianjapedia
Jump to: navigation, search
 
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
Function to update the value of an environment symbol
+
Function to update the value of an environment variable
 
+
  
 
==Syntax==
 
==Syntax==
 
PUTENV(<expC1>,<expC2>)
 
PUTENV(<expC1>,<expC2>)
 
  
 
==See Also==
 
==See Also==
[[ADDBS()]], [[GETENV()]], [[:Category:Printing|Printing]]
+
[[ADDBS()]], [[GETENV()]], [[REG_GETVALUE()]], [[REG_SETVALUE()]]
 
+
  
 
==Description==
 
==Description==
The PUTENV() function updates the value of <expC1> with the character expression <expC2>.  The value of the symbol can be retrieved using the GETENV() function.  If variable <expC1> does not exist, it is created.  If the operation is successful, then PUTENV() returns .T., otherwise .F..
+
The PUTENV() function updates the value of <expC1> with the character expression <expC2>.  The value of the variable can be retrieved using the GETENV() function.  If variable <expC1> does not exist, it is created.  If the operation is successful, then PUTENV() returns .T., otherwise .F..
 
+
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
set printer to \\spooler
+
putenv("APP_USER",user())
putenv("db_print","/usr/recital/UD/print_labels")
+
list status to print
+
? getenv("db_print")
+
/usr/recital/UD/print_labels
+
 
</code>
 
</code>
  
 
==Products==
 
Recital, Recital Server
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Environment]]
 
 
[[Category:Environment Functions]]
 
[[Category:Environment Functions]]
 +
[[Category:Lianja VFP Extensions]]
 +
[[Category:VFP Function Extensions]]

Latest revision as of 11:20, 7 May 2020

Purpose

Function to update the value of an environment variable

Syntax

PUTENV(<expC1>,<expC2>)

See Also

ADDBS(), GETENV(), REG_GETVALUE(), REG_SETVALUE()

Description

The PUTENV() function updates the value of <expC1> with the character expression <expC2>. The value of the variable can be retrieved using the GETENV() function. If variable <expC1> does not exist, it is created. If the operation is successful, then PUTENV() returns .T., otherwise .F..

Example

putenv("APP_USER",user())