bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: thousands separator


From: Gary Ashburn
Subject: Re: thousands separator
Date: Mon, 06 Jul 2009 18:17:16 -0400

~/thoussep> vi thoussep.c
~/thoussep> gcc thoussep.c
~/thoussep> dir
a.exe  thoussep.c
~/thoussep> a.exe
decimal_point = .
thousands_sep =
grouping; =
int_curr_symbol; =
currency_symbol =
mon_decimal_point =
mon_thousands_sep =
mon_grouping =
positive_sign =
negative_sign =
~/thoussep>



At 01:52 PM 7/6/2009, Aharon Robbins wrote:
#include <stdio.h>
#include <locale.h>

struct lconv loc;               /* current locale */

int
main(int argc, char **argv)
{
        setlocale(LC_NUMERIC, "");
        loc = *localeconv();

        printf("decimal_point = %s\n", loc.decimal_point);
        printf("thousands_sep = %s\n", loc.thousands_sep);
        printf("grouping; = %s\n", loc.grouping);
        printf("int_curr_symbol; = %s\n", loc.int_curr_symbol);
        printf("currency_symbol = %s\n", loc.currency_symbol);
        printf("mon_decimal_point = %s\n", loc.mon_decimal_point);
        printf("mon_thousands_sep = %s\n", loc.mon_thousands_sep);
        printf("mon_grouping = %s\n", loc.mon_grouping);
        printf("positive_sign = %s\n", loc.positive_sign);
        printf("negative_sign = %s\n", loc.negative_sign);

        return 0;
}






reply via email to

[Prev in Thread] Current Thread [Next in Thread]