1.9.6 LC_MONETARY data block

The LC_MONETARY data block configures formatting of monetary values.

When defining a locale data block in the C library, the macros that define an LC_MONETARY data block are as follows:

  1. Call LC_MONETARY_begin with a symbol name and a locale name.

  2. Call the LC_MONETARY data macros as follows:

    1. Call LC_MONETARY_fracdigits with two arguments: frac_digits and int_frac_digits from the lconv structure.

    2. Call LC_MONETARY_positive with four arguments: p_cs_precedes, p_sep_by_space, p_sign_posn and positive_sign.

    3. Call LC_MONETARY_negative with four arguments: n_cs_precedes, n_sep_by_space, n_sign_posn and negative_sign.

    4. Call LC_MONETARY_currsymbol with two arguments: currency_symbol and int_curr_symbol.

    5. Call LC_MONETARY_point with one argument: mon_decimal_point.

    6. Call LC_MONETARY_thousands with one argument: mon_thousands_sep.

    7. Call LC_MONETARY_grouping with one argument: mon_grouping.

  3. Call LC_MONETARY_end, without arguments, to finish the locale block definition.

Example LC_MONETARY data block

        LC_MONETARY_begin c_monetary, "C"
        LC_MONETARY_fracdigits 255, 255
        LC_MONETARY_positive 255, 255, 255, ""
        LC_MONETARY_negative 255, 255, 255, ""
        LC_MONETARY_currsymbol "", ""
        LC_MONETARY_point ""
        LC_MONETARY_thousands ""
        LC_MONETARY_grouping ""
Non-ConfidentialPDF file icon PDF versionARM DUI0475M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.