|
On Mar 5, 2018, at 11:57 AM, Peter Dow <petercdow@xxxxxxxxx> wrote:
<snip>
What the compiler "sees" is effectively a single source - Yes. And I would be OK with a rule that says you MUST use /COPY (/INCLUDE) for prototypes. That does at least help to guarantee that there is only one place where they are coded.
</snip>
How would the rule work? Just because a /COPY exists in the using routine that contains the prototypes doesn't mean it's the same /COPY used to compile the used routine.
<snip>
What I don't understand is how you propose that the _using_ routine be informed of the interface requirements. If not via a prototype (and accepting that a system wide facility has too high a cost and too many issues) then how do you propose it could work?
</snip>
When I first started using procedures way back when, it was all within the same program, so it made sense that the compiler could simply check the PI specs. Then when I started using service programs, my first thought was that the compiled service program could have the PI specs available for the using routine to check. But that has the same problems as a /COPY -- if you're compiling in a development environment, the service program there may be different from the production environment's version, and boom! you're trying to figure out a mis-matched parameter issue.
-- *Peter Dow*
/Dow Software Services, Inc. 909 793-9050 petercdow@xxxxxxxxx <mailto:petercdow@xxxxxxxxx> pdow@xxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxx> /
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.