HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
5-39
Syntax
TRIM$(
S
$)
Parameters
S
$ A string expression that is to be trimmed.
Examples
10 A$ = TRIM$(" ab ") !A$ = "ab"
TRN
The TRN function returns an array whose elements are the exchanged rows
and columns of a specified array. Both arrays must be the same type. It
has the form
MAT
num_array1
= TRN(
num_array2
)
where the rows of
num_array1
are the columns of
num_array2
, and the
columns of
num_array1
are the rows of
num_array2
.
num_array1
is
dimensioned (
n
,
m
) and
num_array2
is dimensioned (
m
,
n
).
This function is used with the MAT = statement, with two-dimensional
arrays.
Syntax
TRN(
array
)
Parameters
array
Structured collection of variables of the same type.
The structure is determined when the array is declared.
Examples
10 DIM A(4,3),B(3,4)
.
.
.
80 MAT A = TRN(B)
If B is
8 5 7 3
0 2 9 1
4 6 0 5
then A is
8 0 4
5 2 6
7 9 0
3 1 5
TRUNC
The TRUNC function returns the integer part of a number. The result is
of the same numeric type as the argument.
Syntax
TRUNC(
n
)
Parameters