HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
3- 23
Syntax
{
operand
}
[
operand
]
operator
{
func_name
[(
parameter
[,
parameter
]...)]}
Parameters
operand
First operand is required if operator is binary and not
allowed if operator is unary.
Each operand is one of the following:
* A literal.
* A variable name.
* An expression.
Operand type restriction depends on the operator.
operator
Determines how the value(s) of the operands(s)
produce(s) the result.
func_name
Function name. HP Business BASIC/XL supports the
following types of functions:
* Predefined function.
* Single-line user-defined function.
* Multi-line user-defined function.
parameter
The number of parameters depends on the function. Each
parameter is one of the following:
* A literal.
* A variable name.
* An expression.
Parameter type restrictions are dependent on the types
of the function's formal parameters.
The result of an operation or a predefined function depends on the values
of the operands or parameters, but the values of the operands and
parameters do not change.
A user-defined function can change the values of its parameters if the
parameters are passed by reference.
Operators
HP Business BASIC/XL has three unary operators: unary plus(+), unary
minus (-), and NOT. All other HP Business BASIC/XL operators are binary.
Also, each HP Business BASIC/XL operator is either an arithmetic,
relational, Boolean, or string operator, depending on the types of its
operands and result.
For each operator category, Table 3-19 gives the operand and result
types.
Table 3-19. Operands and Result Types of Operators
---------------------------------------------------------------------------------------------
||||
| Operator | Operand Type | Result Type |
| Category |||