|
>HwaRangRon@aol.com >Sent by: owner-midrange-l@midrange.com > ... >One common function that all of our programs do is to get the current >company that they are working with by accessing a data area. > ... >So, my question is, Is this still worth doing - given >that it's only a couple of line of code retrieving a data area? > ... Ron, I just reread your original post for more than the immediate problem you were having. Yes, it's worth doing because you might someday want to use a different method to hold the current company name. Is the data area used solely for this purpose? If so, you might consider dropping the data area entirely and instead add a setCurrentCompany procedure to the module with the "getCurrentCompany" procedure, with a global variable to hold the name. H nomain D currentCompanyName S 100A P setCurrentCompany B EXPORT D PI D newName 100A CONST C eval currentCompanyName = newName P E P currentCompany B EXPORT D PI 100A C return currentCompanyName P E Even if you continue to use the data area now, it will be much easier to stop using it in the future if you use a procedure to get the information rather than coding the data area access everywhere. This is a perfect text-book example of the "implementation-hiding" aspect of modularity. Barbara Morris +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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.