Conversion of vectorised arrays between numerical data types may be performed by invoking the appropriate VEC_ type conversion routines, using statements such as:
CALL VEC_T
TOT
![]()
( BAD, N, ARG, RESULT, IERR, NERR, STATUS )
Here, the VEC_ routine takes a vectorised input argument array
with N elements of type
T
and returns a vectorised result array of type
T
, having performed type
conversion on each array element.
The data type codes
T
and
T
may be any of
those specified in Table
.
Thus, for example, the subroutine VEC_BTOUW converts a vectorised array of byte data into unsigned word data, while VEC_DTOI converts a vectorised array from double precision to integer.
Note that conversions from floating point types (_REAL or
_DOUBLE) to non-floating point types result in rounding of the data
(not truncation as would happen with a Fortran assignment statement).
PRIMDAT --- Processing of Primitive Numerical Data