|
|
MPE/iX Commands Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 3 Command Definitions C-E CALC |
|
Evaluates an expression. (Native Mode) CALC expression
The CALC command evaluates expression and displays the result to $STDLIST. Expressions can yield integer, string, or Boolean results. Integer results are displayed in decimal, hexadecimal ($ prefix), and octal (% prefix) notations. Boolean expressions are displayed as TRUE or FALSE. The variable HPRESULT is set to the result of the last expression evaluated by CALC. The type of HPRESULT changes depending on the type of result generated by CALC. Table 3-1 “Logical Operators - The CALC Command” lists some of the logical operators for the CALC command. Enter :HELP expressions for more information Table 3-1 Logical Operators - The CALC Command
The operands you may use are any variable, integer, string, Boolean constant, or the system-reserved words WARN, FATAL, SYSTEM, and OK. You may form compound logical expressions using the AND, NOT, XOR, and OR logical operators, optionally nested within parentheses. Do not use the FINFO function with the CALC command for remote files. It ignores their existence and returns incorrect information. This command is available in a session, job, program, or in BREAK. Pressing Break terminates the INPUT( ) function. The result of CALC sample depends on the value entered for sample and on the type of the value, as shown in Table 3-2 “Results of CALC” Table 3-2 Results of CALC
|
|