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



David FOXWELL wrote:
Checking that a field has only characters A-Z is not dependant on a client, so I suddenly had the following brainwave :

Create a new module.

Copy Barbara's code into a function like CheckClientName or something. For a company name I'll add CheckCompanyName and change the constant containing the accepted characters.
>
Profit from the simplicity of this module to persuade the boss to let us integrate it as our first service program.

Great idea! I hope it works out for you - from your previous postings it sounds like your shop can really benefit from the use of service programs.


I'm already realising, however, that the names of the functions and the module aren't that easy to think up, bearing in mind that it could be used universally.

Not to mention finding the right balance between succinctness and expressiveness. One thing we've found useful is to include the module name in the name of any exported procedures, like 'TXT000_checkClientName()'.

This serves two purposes. First, it makes it easy to figure out where the procedure definition resides when maintaining programs that use many modules/service programs. Second, it means you don't need to worry about duplicate names in different service programs.


So putting Client into the names of the functions might not be a good idea. What about the module name? I have to respect a rule of 3 characters and 3 numbers. Should I call it CHR000 or STR000 or TXT000?

One thing to keep in mind is that service programs can contain more than one module.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.