Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

CAST

CAST converts the expression x to the type t using C conversion rules.

Read syntax diagramSkip visual syntax diagram>>-CAST--(:--t--,--x--:)---------------------------------------><
 
t
Name of a scalar "C type"
x
A scalar expression also having "C type"

The supported "C types" are

If x is FLOAT or FIXED DEC, then t must be FLOAT, FIXED or ORDINAL, and if t is FLOAT or FIXED DEC, then x must be FLOAT, FIXED or ORDINAL.

Any conversions that are needed follow the ANSI C rules. This means, for instance, that SIZE will not be raised by CAST and that if negative values are cast to UNSIGNED, then the result will be a large positive number.

IEEE DFP is not supported by CAST.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)