Prism 6.0 Reference Manual

set

Defines abbreviations and sets values for variables.

SYNTAX

set variable = expression

DESCRIPTION

Use the set command to define other names (typically abbreviations) for variables and expressions. The names you choose cannot conflict with names in the program loaded in Prism; they are expanded to the corresponding variable or expression within other commands. For example, if you issue this command:

set x = variable_with_a_long_name

then

print x

is equivalent to

print variable_with_a_long_name

In addition to print and display, the whatis, whereis, and which commands know about variables you set via the set command. For example, issuing the command whatis x after issuing the set command above produces this response:

user-set variable, x = variable_with_a_long_name

In addition, you can use the set command to set the value of certain internal variables used by Prism. These variables begin with a $ so that they will not conflict with the names of user-set variables. You can change the settings of these internal variables:

set $f_precision = 5

causes Prism to print five significant digits for floating-point values.

set $history = -1

Prism uses up memory in maintaining a large history region. A smaller history region, therefore, may improve performance and prevent Prism from running out of memory.

Issue the set command with no arguments to display your current settings.

Issue the unset command to remove a setting (except a predefined one).