|
Dan, Here's your education. :) I don't see a huge advantage for a BIF for abc < 0. If it floats somebody's boat, then ok. The feature that I would argue could be useful for clarity is a figurative constant *NEGATIVE. Let me give you an example. Consider that you might have a procedure with a Boolean return value to indicate success (*Off) or failure (*On) . You could then code something like: C If MyProc( MyParm ) * Perform error processing C EndIf or you might C Eval RtnCode = MyProc( MyParm ) C Select C When RtnCode = *Off * Perform normal processing C When RtnCode = *On * Perform error processing C EndSl This kind of construct works fine for 2 conditions - normal vs. error. However, the procedure might want to return multiple conditions where negative numbers were various error conditions, zero means new customer, and positive numbers mean existing customer of some sort. Here's an example of how you might do this: C Eval RtnCode = MyProc( MyParm ) C Select C When RtnCode > *Zero * Perform existing customer processing C When RtnCode = *Zero * Perform new customer processing C When RtnCode < *Zero * Perform error processing C EndSl I submit it might be clearer to: D Error S N Inz( *Negative ) D ExistingCust S N Inz( *Positive ) D NewCust S N Inz( *Off ) C Eval RtnCode = MyProc( MyParm ) C Select C When RtnCode = ExistingCust * Perform existing customer processing C When RtnCode = NewCust * Perform new customer processing C When RtnCode = Error * Perform error processing C EndSl or something like that. Gary Guthrie "Bale, Dan" wrote: > > Gary, David, Paul, ... > > Please educate me on this. I'm having a hard time seeing the value of > creating a BIF when a simple "If abc < 0" will (should?) suffice. +--- | 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-2024 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.