IRAF help page for package language, program set

from NOAO USAGEPARAMETERSDESCRIPTIONEXAMPLESSEE ALSO

set -- set the value of an IRAF environment variable reset -- reset (overwrite) the value of an IRAF environment variable


USAGE

USAGE

set [varname = valuestring]
reset [varname = valuestring]

PARAMETERS

PARAMETERS

varname

The environment variable to be defined or set.

valuestring

The new string value of the environment variable.


DESCRIPTION

The CL maintains a list of environment variables, each of which consists of a keyword = value pair. The set and reset operators are used to define new environment variables, or to set new values for old environment variables. The two operators are equivalent with the exception that if the named environment variable is already defined, set will push a new, temporary value for the variable, whereas reset will overwrite the most recent definition of the variable. Environment variables may be examined using the show task or the envget intrinsic function.

A particular use for the environment variables is in the definition of IRAF logical names for directories. If an environment variable is set to a string corresponding to a system-dependent directory name, then the enviroment variable may then be used within the CL to refer to that directory.

For example,

	set	testdir = "/usr/iraf/testdir"		# Unix
	set	testdir = "dua2:[iraf.testdir]"		# VMS
	task	tst1 = testdir$tst1.cl

New IRAF logicals may be defined in terms or existing IRAF logical names, i.e., logical names are recursively expanded.

	set	subdir1 = testdir$subdir1/
	task	tst2 = subdir1$tst2.e

If the set command is entered without any arguments the current environment list is printed in the reverse of the order in which the definitions were made. If a variable has been redefined both the final and original definition are shown. The show command can be used to show only the current value.


EXAMPLES

1. Define the data directory "dd" on a remote node, and call implot to make plots of an image which resides in the remote directory.

	cl> set dd = lyra!/u2/me/data
	cl> implot dd$picture

2. Temporarily change the value of the variable printer. The new value is discarded when the bye is entered.

	cl> cl
	cl> set printer = qms
		...
	cl> bye

SEE ALSO

SEE ALSO, show, envget,


This page automatically generated from the iraf .hlp file. If you would like your local iraf package .hlp files converted into HTML please contact Dave Mills at NOAO.

dmills@noao.edu