Borland C++ reference

setlocale

raw OCR

Selects a locale.

Defined in header <locale.h>

Syntax

#include <locale.h>
char "*setlocaleCint category,char Vocale);

Portability

DOSUNIXWindowsANSI CC++ only
■■■

Remarks

Borland C++ supports only the "C" locale at present, so invoking this function has no effect.

Possible values for the argument category:

LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC LC_TIME

Return value

^^ selection is successful, a string is returned to indicate the locale that was in effect prior to invoking the function. If it is not successful, a NULL pointer is returned.

See also

Example

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

int main( void )
{
   char *old_locale;

   /* only locale supported in Borland C++ is  "C" */
   old_locale = setlocale(LC_ALL,"C");
   printfC'Old locale was %s\n",old_locale);
   return 0;

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.