[Info-vax] New VSI Roadmap (yipee!)
Bill Gunshannon
bill at server3.cs.scranton.edu
Tue Mar 3 09:28:34 EST 2015
In article <md2tco$m4r$1 at dont-email.me>,
David Froble <davef at tsoft-inc.com> writes:
> Scott Dorsey wrote:
>> David Froble <davef at tsoft-inc.com> wrote:
>>> Richard Maher wrote:
>>>> On 3/2/2015 11:09 AM, David Froble wrote:
>>>>> Regardless, what's a language doing, not having a rounding function?
>>>> Why is any serious commercial programmer implementing money as a
>>>> floating-point datatype?
>>> In 1973 the only data types supported by RSTS/E were word integers,
>>> single and double FP, and strings. At that time we used what was available.
>>
>> When that is the case, you use integers for cents, then you use input and
>> output routines that deal with the decimal point.
>>
>> Lots of folks did it and still do, when they don't have pic types or bcd
>> types available.
>> --scott
>>
>
> Oh, yeah, let me see. $ -327.68 to $ 327.67 would be quite useful.
>
> I'm beginning to feel that I'm surrounded by young know-it-alls.
> Perhaps a few sessions with TKB and other relics from the past might
> open some eyes.
I think, at this point, you are just being difficult on purpose. I
can think of a number of ways to do money using 16 bit signed integers
that gives you a greater range than your example. As a minimum mine
would be -32767.0000 to 32768.0000. And another order of magnitude is
possible but efficiency starts getting in the way eventually. And none
of this even enters into the concept of using strings as numbers and
doing all your own math the same way you did it in grade school. :-)
bill
--
Bill Gunshannon | de-moc-ra-cy (di mok' ra see) n. Three wolves
billg999 at cs.scranton.edu | and a sheep voting on what's for dinner.
University of Scranton |
Scranton, Pennsylvania | #include <std.disclaimer.h>
More information about the Info-vax
mailing list