🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Max TenEyck Woodbury Wed, 31 Jan 1996 03:39
U.S. monitary unit.
#3145
Author: Max TenEyck Woodbury
Date: Wed, 31 Jan 1996 03:39
22 lines
1808 bytes
    I was just going through the draft standard locale section and noticed what
might be a problem.

    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.

    This problem would be handled easily if there were a monitary facet property 
that specified the size of the display unit in accounting units.  This would
have to be at least 'int' sized to allow accounts kept in mils to display
whole dollars typically seen in tax preperation.  In might be advisable to make 
it 'double' to take care of government economists who deal in 10^9 or 10^12 
dollar hunks.

        Max
---
[ 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://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Re: U.S. monetary unit.
#3209
Author: Nathan Myers, http://www.cantrip...
Date: Fri, 02 Feb 1996 15:49
23 lines
1890 bytes
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
]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads