Topic: U.S. monetary unit.


Author: "Nathan Myers, http://www.cantrip.org/" <ncm@cantrip.org>
Date: 1996/02/02
Raw View
Max TenEyck Woodbury wrote:
>     The standard assumes that the unit of account is the cent or one hundreth
> of a dollar.  Other units of account may be used, including the mil or one
> thousandth of a dollar.  I suggest that there may be a requirement in some
> applications for internal values to be held in mils while display values be
> for some larger unit.
>     There may be similar problems with international currencies.

The locale facets that deal with money are *only* concerned with
display values.  You can represent money in any way you want, but
you communicate the values to the monetary facet in the display units.
It promises to represent those (display) values exactly.

(Actually, the standard makes no assumptions about monetary units,
and you can't count on your vendor implementing a default of (e.g.) cents.
If you want a U.S. locale, your (portable) code had better say so.)

Nathan Myers   ncm@cantrip.org   http://www.cantrip.org/   <-- works now!

[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy is
  summarized in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
]