Conversion of numbers between numerical data types may be performed by invoking the appropriate NUM_ type conversion functions, using statements such as:
RESULT = NUM_T
TOT
( ARG )
Here, the NUM_ function takes an argument of type
T
and returns a result of type
T
, having performed type
conversion.
The data type codes
T
and
T
may be any of
those specified in Table
.
Thus, for example, the function NUM_BTOUW converts a byte argument to an unsigned word result, while NUM_DTOI converts 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