06-13-2022, 08:49 PM
(This post was last modified: 06-13-2022, 08:55 PM by Kernelpanic.)
(06-13-2022, 07:07 PM)bplus Wrote: Rounding errors are notorious in QB64, for currency do what Steve suggests use Long integers and then use a showCurrency routine that inserts the decimal point 3 spaces to left when ever need to display a number. I did this with my adding machine and haven't had any annoying errors since.
Kind of reminds me of Cobol.
Pic, Pic, Pic, . . . (Microfocus Cobol 3.0 Prof)
Code: (Select All)
WORKING-STORAGE SECTION.
. . .
77 Menge PIC 9(3).
77 Artikel PIC X(20).
77 Einzelpreis PIC 9(4)v99.
77 Ges-Preis PIC 9(5)v99.
77 MwSt PIC 99 VALUE 14.
77 Endpreis PIC 9(5)v99.
77 A-Menge PIC z9.
77 A-Einzelpreis PIC z.zz9,99.
77 A-GesPreis PIC zz.zz9,99.
77 A-Endpreis PIC zz.zz9,99.
77 Endstrich PIC X(80) VALUE ALL "-".