Borland C++ reference

localeconv

raw OCR

Returns a pointer to the current locale structure.

Defined in header <locale.h>

Syntax

#include <locale.h>
struct Iconv *localeconv(void);

Portability

DOSUNIXWindowsANSI CC++ only
■■■

Remarks

This function sets up country-specific monetary and other numeric formats. However, Borland C++ currently only supports locale C.

Return value

Returns a pointer to the current locale structure. See locale.h for details.

See also

Example

#include <locale.h>
#include <stdio.h>

int main(void)
{
   struct Iconv 11;
   struct Iconv *conv = &11;

   /* read the locality conversion  structure */
   conv = localeconv 0 ;

   /* display the structure */
   printf "Decimal Point                     %s\n"  conv->decimal_point);
   printf "Thousands Separator               %s\n"  conv->thousands_sep);
   printf "Grouping                          %s\n"  conv->grouping);
   printf "International Currency  symbol    ls\n"  conv->int_curr_symbol);
   printf "$ thousands separator             %s\n"  c onv->mon_t housands_sep
   printf "$ grouping                        %s\n"  conv->mon_grouping);
   printf "Positive sign                     ls\n"  conv->positive_sign);
   printf "Negative sign                     %s\n", conv->negative_sign);
   printf "International fraction digits     %d\n"  conv->int_frac_digits);
   printf "Fraction digits                   %d\n"  conv->frac_digits);
   printf "Positive $ symbol precedes        %d\n"  conv->p_cs_precedes);
   printf "Positive sign space separation    %d\n"  conv->p_sep_by_space);
   printf "Negative $ symbol precedes        %d\n"  conv->n_cs_j)recedes) ;
   printf "Negative sign space separation    %d\n"  conv->n_sep_by_space);
   printf "Positive sign position            %d\n"  conv->p_sign_posn);
   printf "Negative sign position            %d\n"  conv->n_sign_posn);
   return 0;

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.