× 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.



I posed this question on MCPressOnline the other day but I would like to
get more opinions on it so I'll post it here too.   A shop-standard
hangs in the balance.

To me, this statement about a "shop standard" is a very strange one. How often do you need to write code like this?! Seriously... does this come up a lot? If you only have to write it once, then why would it be a shop standard?

Write a subprocedure, in a service program, that retrieves the closest match record. Call that subprocedure from everywhere. Make your shop standard to call that routine rather than to re-code something many times that should only be coded once!

Surely for maintainability's sake, it's easier to maintain the code in one place than in many?!

As for the difference in maintainability of SETLL vs CHAIN, or of performance between SETLL and CHAIN... who cares? If you only have it coded once and the routine you've coded it in is short and simple, then nobody is going to have a hard time maintaining it! And if you try it, and the performance isn't acceptable, then you can change it and test it in one place and solve the problem. You could even change it to something more complicated (like the array that Rory suggested) if you need to, and there'd be only one place to change it.

Or do you have a lot of files that work the same way?

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.