Difference between revisions of "PUTENV()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
==Purpose== | ==Purpose== | ||
| − | Function to update the value of an environment | + | Function to update the value of an environment variable |
| Line 15: | Line 8: | ||
==See Also== | ==See Also== | ||
| − | [[GETENV()]] | + | [[ADDBS()]], [[GETENV()]], [[:Category:Printing|Printing]] |
==Description== | ==Description== | ||
| − | The PUTENV() function updates the value of <expC1> with the character expression <expC2>. The value of the | + | 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 | + | set printer to \\spooler |
| − | putenv(" | + | putenv("DB_PRINT","/usr/recital/UD/print_labels") |
list status to print | list status to print | ||
| − | ? getenv(" | + | ? getenv("DB_PRINT") |
/usr/recital/UD/print_labels | /usr/recital/UD/print_labels | ||
</code> | </code> | ||
| Line 33: | Line 26: | ||
==Products== | ==Products== | ||
| − | Recital | + | Recital, Recital Server |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
| + | [[Category:Environment]] | ||
| + | [[Category:Environment Functions]] | ||
Latest revision as of 16:14, 10 February 2012
Purpose
Function to update the value of an environment variable
Syntax
PUTENV(<expC1>,<expC2>)
See Also
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
set printer to \\spooler putenv("DB_PRINT","/usr/recital/UD/print_labels") list status to print ? getenv("DB_PRINT") /usr/recital/UD/print_labels
Products
Recital, Recital Server