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



Are you sure you are seeing the actual prototypes at the bottom of the source listing and not the procedures themselves? Prototypes are part of the D specs which need to be in the source listing before the code itself.

As far as putting them in a copy book vs. the program's source goes, I find putting the prototypes for anything that is shared with another program or service program into a copy book works best for me. For example, if I write a service program, I'll put all of the prototypes for the exposed procedures in a copy book along with any constants and/or data structures that calling programs will need to use it. Both the service program and the calling program will then import the same copy book.

Matt

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of GKern@xxxxxxxxxxxxxxxx
Sent: Monday, December 22, 2008 9:04 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Question about prototyping

I've seen a few instances of where the actual code for a prototype (or
more than one prototype) is found at the bottom of an RPG source member.

I've often read and learned to code almost all of my prototypes to be
accessed via /copy members where the actual code is either a separate
module or part of a service program.

The only reason I see for doing this would be to be able to use them like
subroutines that could accept parameters where the process is performed
only within a single program. But then wouldn't that still lend itself to
a /copy book? Or is this just a matter of personal preference that is
arbitrary to the application?

Or are there other reasons for coding prototypes at the bottom of an RPG
program that I'm unaware of?

Any links to good articles explaining this approach would be appreciated.

Thanks!

Regards, Jerry

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.