<<<<<<<<<<<<<<<<<

Environment(unix) LYMB Environment(unix)

NAME

environment - LYMB interface to user's environment space

DESCRIPTION

The environment class allows the user to access and modify variables in the environment.

SUPERCLASS

object

INSTANCE VARIABLES

val The current value of the environment variable.

variable The name of the environment variable.

MESSAGES

value[=?] Set or get the value of the environment variable.

variable[=?] Set or get the name of the environment variable. Since the parser converts all strings to lower case, it is often necessary to protect the assignment in quotes (see example below).

defined? Check if the environment variable is currently defined.

EXAMPLES

The following LYMB script first checks to see if the variable LYMB_RENDERER is defined. If not, it prints a warning and exits. If it is defined, then it uses its value for the class name of the renderer to create.

environment new: env variable="LYMB_RENDERER" ;

logic new: test equal: ([env defined?], 0) true: ` shell new: msg command=`echo LYMB_RENDERER is undefined. Exiting...' trap_output_off! do! ; parser exit!;' ;

object # [env value?] new: arenderer ;

SEE ALSO

shell, sh(1), csh(1), ksh(Common), environ(5)


Please send comments and suggestions to
consult@rpi.edu