Computer arithmetic

Jean-Pierre A. Radley appl at jpr.com
Sun Jun 16 08:21:34 PDT 2013


Jean-Pierre A. Radley propounded (on Thu, Jun 13, 2013 at 06:42:56PM -0400):
| Richard D. Williams propounded (on Thu, Jun 13, 2013 at 03:22:31PM -0500):
| | 
| | Have you tried doing it with out the $ edit?
| 
| I did at first, but when the CSV fle was displayed as a spreadsheet, the
| results were ugly, in that values like
| 
| 	100.00	200.50	300.75
| 
| showed up as
| 
| 	100	200.5	300.75
| 
| i.e. dollar amounts were not lined up.

Another nice thing about using the '$' filepro edit: when Excel reads
'$1234567.89' in a CSV file, it is displayed as $1,234,567.89.

I let it all rest for a day or two, and then ripped out the processing
and rewrote it, still using the '$' edit for money and an occasional
leading chr("39") to force left-justification of certain columns.  I
also learned to have filePro write an Excel SUM function to add up
the money columns.  It all worked out just fine, with the Excel SUMs
agreeing with the filePro-accumulated totals.  I must have imbibed more
coffee during my new attempt (or perhaps less).

I think my main problem when I started this thread was that I was
writing this for a client running an older version of filePro, and
bungled my emulation of @ONCE and @DONE.

-- 
JP


More information about the Filepro-list mailing list