|
|
MPE/iX Commands Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 7 Command Definitions S-SOSETVAR |
|
Assigns values to MPE/iX variables. (Native Mode)
This command assigns values to MPE/iX variables. Variable names may be any combination of letters and numbers plus the underbar character, up to a total of 255 characters. Variables must start with a letter or the underbar character. The expression parameter may be an MPE/iX expression, a Boolean, integer, or string value, or the name of another variable. If expression consists of elements and operators MPE/iX accepts ('abc' + 'cd' or 2*5+1), SETVAR will evaluate it. The operators defined in Table 7-1 “Logical Operators - The SETVAR Command” may be used in expression. Table 7-1 Logical Operators - The SETVAR Command
The allowed operands are any variable, integer constant (hexadecimal ($), octal (%), or decimal) quoted string constant, the Boolean constants TRUE and FALSE, or the JCW mnemonics (SYSTEM, FATAL, for example, as defined in the SETJCW command). Note that all variables are global, so the CI variable name should not be the same as the JCW name that is being used or the operation of the code that uses that JCW will be affected. Compound logical expressions can be formed using the AND, NOT, XOR, and OR logical operators, and nested within parentheses. The Boolean value of the keyword TRUE or FALSE is overridden if there is a variable of the same name. For example, to store the string value 'ABC' in X, enter:
The SETVAR command may be used to set the command interpreter's search path (HPPATH), the command interpreter's prompt (HPPROMPT), and all other variables. You use SHOWVAR to see all the variables that were created by the user. Issuing SHOWVAR @ causes the display of every predefined and user-defined variable. This command may be issued from a session, job, program, or in BREAK. Pressing Break terminates an INPUT ( ) function. To change the command interpreter prompt to your username.accountname, enter:
The result is the same regardless of which form of the command you use. |
|