Such an approach is the only way to get acurate computing with QDOS/SMS up
to 9 digits : for most purpose (I mean : when you expect that 1 and 1 is 2,
not 1.999/2.00001 or something else) floating point number is nonsense.
PROCs and FNs like IDEC$() and LPUT/LGET are very useful in this respect.

Claude

-----Message d'origine-----
De : Norman Dunbar [mailto:[EMAIL PROTECTED]]
Envoyé : jeudi 21 juin 2001 11:25
À : '[EMAIL PROTECTED]'
Objet : RE: [ql-users] NEXT in FOR-loop


-----Original Message-----
From: Tony Firshman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 10:18 AM
To: [EMAIL PROTECTED]
Subject: Re: [ql-users] NEXT in FOR-loop


>> That sort of approach is used by accountants isn't it?
>> From what I remember they always work in the lowest unit - ie cents or
>> pence, and then format the output for reports.

When I first started programming professionally, I used COBOL. IN that you
define numbers with an implied decimal point, so a field to hold up to
999.99 would be defined as PIC 999v99.

When it was time to do counting etc, one simply ignored the decimals all
together. At display or printout time, it was moved to a display field which
was defined as PIC 999.99 (or PIC 999I.99 depending on your COBOL version)
and it displayed/printed correctly.

Simple.

Anyone fancy writing a COBOL compiler for the QL :o)

MMmmm - that could be my next series of articles in QL Toady !  (Only
kidding Dilwyn, only kidding !)

----------------------------------------------------------------------------
----
Norman Dunbar           EMail:  [EMAIL PROTECTED]
Database/Unix administrator     Phone:  0113 289 6265
Lynx Financial Systems Ltd.     Fax:    0113 201 7265
                        URL:    http://www.LynxFinancialSystems.com
----------------------------------------------------------------------------
----

Reply via email to