|
-----Message d'origine-----
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Simon Coulter
In your case you're doing the reverse; you want Program1 to invoke a
procedure in Program2 via a procedure pointer--almost as a
direct call
into Program2. That means Program1 needs to know stuff about
Program2
(otherwise known as tight-coupling). That would normally be better
served by a function-code parameter which Program1 uses to request
Program2 to perform a specific type of processing. This does
result in
Program2 having a (possibly big) select statement that tests the
function-code and branches to the correct procedure but the
resulting
interface is a lot cleaner than what you're proposing.
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.