|
That is true. And RPG will truncate your decimals. So which is the lesser of two evils? IMO, I would rather have to worry about overflow than accuracy. It is a lot easier for me to think that I need a long int instead of a short int in C, or need 13 places instead of 10 places in RPG, than it is for me to try to determine how many decimal places RPG is going to truncate. Regards, Jim Langston Joel Fritz wrote: > You're right, what I was trying to say is that C doesn't care about the > overflow in the signed (or unsigned) integer. If you overflow a signed > integer you'll most likely get a negative, overflow an unsigned integer > you'll probably get something smaller than you expected. > > There's also the thing with floating point calculations that should result > in zero, but that's just a formatting issue. <g> <SNIP> Another few million electron's lives saved. +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.