DFP | NODFP

Category

Floating-point and integer control

Pragma equivalent

None.

Purpose

Provides support for decimal floating-point types.

When the DFP option is in effect, decimal floating-point support is enabled.

When the NODFP option is in effect, decimal floating-point support is disabled, which includes disabling the _Decimal32, _Decimal64, and _Decimal128 keywords.

Syntax

Read syntax diagramSkip visual syntax diagram
   .-NODFP-.   
>>-+-DFP---+---------------------------------------------------><

Defaults

NODFP

Usage

The decimal floating-point format assists with avoiding potential rounding problems, which can result from using binary or hexadecimal floating-point types to handle decimal calculations.

When DFP is enabled the following decimal type specifiers are supported:
  • _Decimal32
  • _Decimal64
  • _Decimal128
For further information on these reserved keywords, decimal literal support, and decimal floating-point type conversions, see z/OS XL C/C++ Language Reference.
Note: The DFP option can only be used with ARCH values greater than or equal to 7.

Predefined macros

__IBM_DFP__ is predefined to 1 when the DFP compiler option is in effect.