HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)

5- 22
any numeric type.
Examples
10 A = MIN(3,1,2) !A = 1
MUL
The MUL function returns an array that is the result of multiplying two
arrays. The arrays being multiplied must be of the same numeric type and
the result array must be a different variable than either of the arrays
being multiplied. This function has the form:
MAT
num_array1
= MUL(
num_array2
,
num_array3
)
where
num_array1
is
num_array2
multiplied by
num_array3
. Table 5-6 shows
the dimensions of each array in different cases.
Table 5-6. Dimensions of MUL Function Arguments and Results
---------------------------------------------------------------------------------------------
||||
| Dimensions of | Dimensions of | Dimensions of |
|
num_array2
|
num_array3
|
num_array1
|
|||(result) |
||||
---------------------------------------------------------------------------------------------
||||
|(
m,n
)|(
n,p
)|(
m,p
)|
||||
---------------------------------------------------------------------------------------------
||||
|(
m,n
)| (
n
)|(
m
)|
||||
---------------------------------------------------------------------------------------------
||||
|(
m
)|(
m,p
)| (
p
)|
||||
---------------------------------------------------------------------------------------------
This function is used with the MAT = statement, with two dimensional
arrays.
Syntax
MUL(
array1
,
array2
)
Parameters
array1
Structured collection of variables of the same type.
The structure is determined when the array is declared.
array2
Structured collection of variables of the same type.
The structure is determined when the array is declared.
Examples
Example 1.
10 DIM A(2,4), B(2,3),C(3,4)
.
.
.
110 MAT A = MUL(B,C)
If B is
5 3 1
2 7 8
and C is
1 2 8 5
7 1 3 7
6 4 2 9
then A is