× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




On Feb 23, 2010, at 7:52 AM, rpg400-l-request@xxxxxxxxxxxx wrote:

I guess I prefer to write code which up-front checks (and caters) for as
many errors as I can think of. Of course this means that the code is full of
little IF-clauses checking for this error and that. So I'd be in your latter
group.

I've never liked the MONITOR op-code, because it allows developers to rely
on the system to catch things which they should have checked for in the
first place. In Scott Klement's article which Kurt linekd to, Scott uses his
CleanUp() procedure to clean up job log errors that might happen if he
attempts to divide by zero. Me, I would have checked for zero before the
divide. Likewise with the other errors.



Sorry Rory, on this one I have to (almost) 100% disagree with you.

Of course any programming technique can be abused - but in my opinion the beauty of Monitor (i.e. try/catch) coding is that it a) makes it obvious what the intended code path was and b) exactly which types of error the programmer anticipated and how they are handled. You can never tell that for sure with the older programming techniques. It is sooooo much better than encountering a test on a variable and then finding out 60 lines later why the programmer did it. And please don't try to convince me that comments are the answer to that problem <grin>

The job log issue is a design "feature" that should be fixed by IBM - but the coding technique is a good one. DOn't throw out the baby with the bath water.

Jon Paris

www.Partner400.com
www.SystemiDeveloper.com




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.