[#BloombergLP-bdldfp-DecimalFormatConfig-2constructor-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalFormatConfig.adoc[DecimalFormatConfig]::DecimalFormatConfig
:relfileprefix: ../../../
:mrdocs:

Create an object of this class having the specified `precision` to control how many digits are written after a decimal point&period; The behavior is undefined unless `precision &gt;&equals; &hyphen;1`&period; Optionally specify `style` to control how the number is written&period; If it is not specified, `e&lowbar;NATURAL` is used&period; Optionally specify `sign` to control how the sign is output&period; If is not specified, `e&lowbar;NEGATIVE&lowbar;ONLY` is used&period; Optionally specify `infinity` as a string to output infinity value&period; If it is not specified, &quot;inf&quot; is used&period; Optionally specify `nan` as a string to output NaN value&period; If it is not specified, &quot;nan&quot; is used&period; Optionally specify `snan` as a string to output signaling NaN value&period; If it is not specified, &quot;snan&quot; is used&period; The behavior is undefined unless the pointers to `infinity`, `nan` and `snan` remain valid for the lifetime of this object&period; Optionally specify `point` as the character to use for decimal points&period; If it is not specified, `&period;` is used&period; Optionally specify `exponent` as the character to use for exponent&period; If it is not specified, `e` is used&period; Optionally specify `showpoint` to force a decimal point to always be written&period; Optionally specify `expWidth` to force at least that many digits to be written for an exponent, up to the number of digits in the largest supported exponent&period; If it is not specified, 2 is used&period; The behavior is undefined unless `expWidth` is 1, 2, 3, or 4&period; See the  section for information on the class attributes&period;

== Synopsis

Declared in `&lt;bdldfp&lowbar;decimalformatconfig&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
DecimalFormatConfig(
    int precision,
    xref:BloombergLP/bdldfp/DecimalFormatConfig/Style-06.adoc[Style] style = e&lowbar;NATURAL,
    xref:BloombergLP/bdldfp/DecimalFormatConfig/Sign-0a.adoc[Sign] sign = e&lowbar;NEGATIVE&lowbar;ONLY,
    char const* infinity = &quot;inf&quot;,
    char const* nan = &quot;nan&quot;,
    char const* snan = &quot;snan&quot;,
    char point = &apos;&period;&apos;,
    char exponent = &apos;e&apos;,
    bool showpoint = false,
    int expWidth = 2);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
