Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_modenv( <cenvar>, <cvalue> ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_MODENV( <cEnvar>, <cValue> )


Parameters

<cEnvar>
Name of the environment variable to set.

<cValue>
Value to assign to the environment variable.


Description

Primarily intended for modifying the PATH environment, but may be used 
to add, modify or delete any variable. Should be used with care.

Note  When adding to a variable, you must provide the entire new 
string, not just the new portion.

Both the root and current environment are modified. If N_MODENV() 
increases the size of an environment string it may be necessary for 
NetLib to allocate additional memory from DOS.  Since Clipper usually 
allocates all available DOS memory, it may be necessary to explicitly 
exclude a small amount of memory from Clipper for this purpose.  Use 
the environment setting 'SET CLIPPER=Xnnn'.

If modifying the PATH variable on a Novell network, NetLib 
automatically adds the network drives in the path (up to the first 16) 
to the NetWare Search Drive list.


Examples

// Create drive mapping for F,
// and then add to search list 
N_MAPDRIVE('F:', 'SYS:APPL\USER\DATA')
current_path = N_GETENV('PATH') 
N_MODENV('PATH', current_path + ';F:')

// Remove the LIB environment variable, if it exists
N_MODENV('LIB', '')




See Also: N_ENVLEN() N_ENVSIZ() N_GETENV()

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