SeeView Manual

SeeView Language Elements
HP NonStop SeeView Manual526355-004
5-14
Expressions
Expressions
The term expression refers to any combination of:
Integer constants
Integer variables
String constants
String variables
Arithmetic operators ( :=, +, -, *, /, MOD)
Relational operators (<, >, >=, <=, <>, =)
Boolean operators (AND, OR, NOT)
Shift operators (>>, <<)
String functions (#TAKE, #DROP, #TRIM, #SIZE)
Expressions permit mixing all of these items. Designational integer assignment
expressions that use the assignment operator (:=) are permitted anywhere an
expression is permitted.
The expression ( x := #s > 10 ) results in:
x = true (minus-one value) if #s starts with an ASCII string of numeric characters
greater than 10.
x = false (zero value) if #s starts with an ASCII string of numeric characters less
than or equal to 10.
Run-time error "Input conversion #s" if #s contains a value that is too large (greater
than 32767) or begins with nonnumeric characters.
Operations between mixed types of expressions (for example, integer and string)
convert string data to internal arithmetic values automatically. Relational comparisons
between strings such as (#a > #b) result in a relational string comparison, not a
relational arithmetic comparison.
Integer Assignment
Integer assignment statements begin with the optional keyword LET and follow first
with the integer variable, then with the := assignment operator, and finally with the
expression to be evaluated and assigned to the integer variable.
You can also specify integer assignment by using designational expressions anywhere
an expression is permitted. For more information on designational expressions, see the
description for the Parentheses ( ) on page 9-140.