HP 3000 Manuals

TRN [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Reference Manual

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



MPE/iX 5.0 Documentation