🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6482

Re: Who uses BASIC these days (for serious application writing)

#6482
From: Tom Almy
Date: Wed, 17 May 1989 14:39
33 lines
1982 bytes
In article <960018@hpclskh.HP.COM> skh@hpclskh.HP.COM (The Polar Bear) writes:
>>>skh writes:
>>>I'll take BASIC any day.  I wouldn't use C for financial programs myself.
>>>Lack of support for fully accurate decimal arithmetic is a killer.

>>I've never understood why this is such a big problem.
>>Why cannot you just store dollars-and-cents as an
>>integer number of cents?

>Integer arithmetic is often of insufficient range for financial applications.
>When you start doing programs for multi-national companies and governments,
>you start needing exponents.

Well, if those multi-national companies and governments need to handle billions
of dollars accurate to the nearest cent, they still need integer arithmetic!
Or at least 64bit floating point, in which case they might as well be using
integers.

>Admittedly, many companies DO use integer arithmetic to get around this.  But
>many are unwilling.  The extra programming involved is a real headache.

It all depends on the language you use.  Languages that use packed decimal
arithmetic (PL/1 or COBOL, some BASICs) can usually do the job.  So can LISP 
(with "Bignums") or Smalltalk.  I wrote and support a CAD program that does 
almost all arithmetic in integers to avoid rounding problems -- it is written
in Forth, and the current version I use supports 32 and 64 bit integers.
64 bit gives enough digits for any country!

C-lovers can switch to C++ and define a new class of big numbers.

Tom Almy
toma@tekgvs.labs.tek.com
Standard Disclaimers Apply
Technical Details
Message-ID: <5169@tekgvs.LABS.TEK.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tektronix!tekcrl!tekgvs!toma
References: <11581@well.UUCP> <960018@hpclskh.HP.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tektronix!tekcrl!tekgvs!toma
From: toma@tekgvs.LABS.TEK.COM (Tom Almy)
Newsgroups: comp.lang.misc
Subject: Re: Who uses BASIC these days (for serious application writing)
Message-ID: <5169@tekgvs.LABS.TEK.COM>
Date: 17 May 89 14:39:04 GMT
References: <11581@well.UUCP> <960018@hpclskh.HP.COM>
Reply-To: toma@tekgvs.LABS.TEK.COM (Tom Almy)
Organization: Tektronix, Inc., Beaverton,  OR.
Lines: 33