|
Doug wrote: >>Secondly, if you pass a value of say -0.0000000001 [or] >>values greater than 9999999999999999999... > >I did qualify it as only working on numeric fields up to 30 digits and >9 decimals, by which I meant no more than 21 significant digits to the >left of the decimal or more than 9 decimal positions. But I figured >we all knew what that meant. I have never yet had a business ap which >needed larger values than that, although I suppose some have. OK, maybe I'm being too picky, but you know what's going to happen with this procedure. Sure, it's documented to only work with (30,9) numeric values, but a few months or a few years later, someone (maybe even you) will write some code passing a value outside the supported range. A value too big is fine since you get the exception right away. But you might have a heck of a time tracking down a bug caused by passing too small a value since the failure won't happen at the procedure call. > >C'mon Hans, you're always griping that we ask you to give us %BIF's >instead of coding our own subprocedures. So I try and beat you to the >punch and offer one, then you go and point out that it has limitations >that a true %BIF wouldn't have. Ouch! It's those darned decimal variables that always give us grief. Actually, if you really want this "IsNegative" procedure to work, I think if you make the parameter a long float value parameter, that should do the trick since the exact value isn't really important anyways. You may lose some precision while passing large decimal values, but the sign would always be preserved. Cheers! Hans Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com +--- | 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.