HELPLIB.HLB  —  CRTL  localeconv  Description
    The localeconv function returns a pointer to the lconv structure
    defined in the <locale.h> header file. This structure should
    not be modified by the program. It is overwritten by calls to
    localeconv, or by calls to the setlocale function that change the
    LC_NUMERIC, LC_MONETARY, or LC_ALL categories.

    The members of the structure are:

    Member                 Description

    char *decimal_point    The radix character.
    char *thousands_sep    The character used to separate groups of
                           digits.
    char *grouping         The string that defines how digits are
                           grouped in nonmonetary values.
    char *int_curr_symbol  The international currency symbol.
    char *currency_symbol  The local currency symbol.
    char *mon_decimal_     The radix character used to format
    point                  monetary values.
    char *mon_thousands_   The character used to separate groups of
    sep                    digits in monetary values.
    char *mon_grouping     The string that defines how digits are
                           grouped in a monetary value.
    char *positive_sign    The string used to indicate a nonnegative
                           monetary value.
    char *negative_sign    The string used to indicate a negative
                           monetary value.
    char int_frac_digits   The number of digits displayed after
                           the radix character in a monetary value
                           formatted with the international currency
                           symbol.
    char frac_digits       The number of digits displayed after the
                           radix character in a monetary value.
    char p_cs_precedes     For positive monetary values, this is
                           set to 1 if the local or international
                           currency symbol precedes the number, and
                           it is set to 0 if the symbol succeeds the
                           number.
    char p_sep_by_space    For positive monetary values, this is
                           set to 0 if there is no space between the
                           currency symbol and the number. It is set
                           to 1 if there is a space, and it is set to
                           2 if there is a space between the symbol
                           and the sign string.
    char n_cs_precedes     For negative monetary values, this is
                           set to 1 if the local or international
                           currency symbol precedes the number, and
                           it is set to 0 if the symbol succeeds the
                           number.
    char n_sep_by_space    For negative monetary values, this is
                           set to 0 if there is no space between the
                           currency symbol and the number. It is set
                           to 1 if there is a space, and it is set to
                           2 if there is a space between the symbol
                           and the sign string.
    char p_sign_posn       An integer used to indicate where the
                           positive_sign string should be placed for
                           a nonnegative monetary quantity.
    char n_sign_posn       An integer used to indicate where the
                           negative_sign string should be placed for
                           a negative monetary quantity.

    Members of the structure of type char* are pointers to strings,
    any of which (except decimal_point) can point to "", indicating
    that the associated value is not available in the current locale
    or is zero length. Members of the structure of type char are
    positive numbers, any of which can be CHAR_MAX, indicating that
    the associated value is not available in the current locale.
    CHAR_MAX is defined in the <limits.h> header file.

    Be aware that the value of the CHAR_MAX macro in the <limits.h>
    header depends on whether the program is compiled with the
    /UNSIGNED_CHAR qualifier:

    o  Use the CHAR_MAX macro as an indicator of a nonavailable value
       in the current locale only if the program is compiled without
       /UNSIGNED_CHAR (/NOUNSIGNED_CHAR is the default).

    o  If the program is compiled with /UNSIGNED_CHAR, use the SCHAR_
       MAX macro instead of the CHAR_MAX macro.

    In /NOUNSIGNED_CHAR mode, the values of CHAR_MAX and SCHAR_MAX
    are the same; therefore, comparison with SCHAR_MAX gives correct
    results regardless of the /[NO]UNSIGNED_CHAR mode used.

    The members grouping and mon_grouping point to a string that
    defines the size of each group of digits when formatting a
    number. Each group size is separated by a semicolon (;). For
    example, if grouping points to the string 5;3 and the thousands_
    sep character is a comma (,), the number 123450000 would be
    formatted as 1,234,50000.

    The elements of grouping and mon_grouping are interpreted as
    follows:

    Value      Interpretation

    CHAR_MAX   No further grouping is performed.
    0          The previous element is to be used repeatedly for the
               remainder of the digits.
    other      The integer value is the number of digits that comprise
               the current group. The next element is examined to
               determine the size of the next group of digits before
               the current group.

    The values of p_sign_posn and n_sign_posn are interpreted as
    follows:

    Value    Interpretation

    0        Parentheses surround the number and currency symbol.
    1        The sign string precedes the number and currency symbol.
    2        The sign string succeeds the number and currency symbol.
    3        The sign string immediately precedes the number and
             currency symbol.
    4        The sign string immediately succeeds the number and
             currency symbol.
Close Help