comp.lang.ada
 help / color / mirror / Atom feed
* Financial Calculations in Ada
@ 2008-07-20 23:27 rd
  2008-07-21  2:32 ` Keith Thompson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: rd @ 2008-07-20 23:27 UTC (permalink / raw)




I'm playing around some with Ada, and today started with the
intent of cooking up a crappy mortgage calculator.  I did the
obvious:

     type Money is delta 0.01 digits 12;
     package MIO is new Ada.Text_IO.Decimal_IO (Money); use MIO;

I hit a brick wall more quickly than usual in that I couldn't
figure out a good way to handle interest rates that might have
a decimal value with more digits than my Money type, such as 7.125.

Can anyone give me any tips on how to handle this sort of thing
in Ada?

-- 
rd



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-07-21  8:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-20 23:27 Financial Calculations in Ada rd
2008-07-21  2:32 ` Keith Thompson
2008-07-21  5:11   ` tmoran
2008-07-21  4:46 ` Gautier
2008-07-21  8:24 ` Graham Stark
2008-07-21  8:30   ` Georg Bauhaus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox