Defines abbreviations and sets values for variables.
set variable = expression
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:
$d_precision, $f_precision -- Use these variables to specify the default number of significant digits Prism prints for doubles and floating-point variables, respectively. Prism's defaults are 16 for doubles and 7 for floating-point variables; this is the maximum precision for these variables. The value you set applies to printing in both the command window and text visualizers. For example,
set $f_precision = 5
causes Prism to print five significant digits for floating-point values.
$history -- Prism stores the maximum number of lines in the history region in this variable. When the history region reaches the maximum, Prism starts throwing away the earliest lines in the history. The default number of lines in the history region is 10,000. To specify an infinite length for the history region, use any negative number. For example,
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.
$fortran_string_length -- Prism uses this value as the length of a character string when the length is not explicitly specified. The default is 10.
$fortran_adjust_limit -- Prism uses this value as the limit of an adjustable array. The default is 10.
$page_size -- This value is used only in commands-only Prism. It specifies the number of output lines Prism displays before stopping and prompting with a more? message. Prism obtains its default from the size of your screen. If you specify 0, Prism never displays a more? message.
$print_width -- This value is used only in commands-only Prism. It specifies the number of items to be printed on a line. The default is 1.
$prompt_length--This value is used only in MP Prism. It specifies the maximum number of characters to appear in the pset part of the (prism) prompt. The default is 25.
$radix -- This value specifies the radix to be used for printing the values of variables. Possible settings are 2 (binary), 8 (octal), 10 (decimal), and 16 (hexadecimal). The default is 10.
Issue the set command with no arguments to display your current settings.
Issue the unset command to remove a setting (except a predefined one).