RE: setlocale


Subject: RE: setlocale
From: WJCarpenter (bill-abisource@carpenter.ORG)
Date: Tue Apr 17 2001 - 15:15:59 CDT


dom> When should you use it? At least before and after every sprintf()
dom> that has a numeric value. We've got to make sure that these
dom> formatted numbers work right (our number parsing routines don't
dom> know what to do with 8,500in and they shouldn't have to - 8.500in
dom> is the standard we're sticking to).

dom> setlocale(LC_NUMERIC, "C"); // set locale to C sprintf(buf,
dom> "%.4f", float_foo); setlocale(LC_NUMERIC, ""); // reset locale

Now *that* is my idea of a good place for a macro.

-- 
bill@carpenter.ORG (WJCarpenter)    PGP 0x91865119
38 95 1B 69 C9 C6 3D 25    73 46 32 04 69 D6 ED F3



This archive was generated by hypermail 2b25 : Tue Apr 17 2001 - 15:15:19 CDT