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

DECIMAL FIXED to BINARY FIXED with fractions

  dcl I fixed bin(31,5) init(1);
      I = I+.1;

The value of I is now 1.0625. This is because .1 is converted to FIXED BINARY (5,4), so that the nearest binary approximation is 0.0001B (no rounding occurs). The decimal equivalent of this is .0625. The result achieved by specifying .1000 in place of .1 would be different.


Terms of use | Feedback

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