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



Rory Hewitt wrote:

I have to agree with you - I've never liked coding DEFINEs in my program
source - I like to be able to simply code COPYs. Plus, I like the fact that
if you have a separate prototype copybook, you can include lots of comments
about *how* the procedure should be called, possible return values etc.,
whilst leaving the actual procedure code as a black-box. This is especially
true for shipped software.


I use separate files for prototypes etc too, but if I _was_ going to use the same file, I'd code all the /copy stuff at the top, with all the nice comments etc. Then I'd code the real module after the /copy stuff, and have it copy itself in when it needed the prototypes.

Denis, if you use this mechanism with SQL, you have to specify RPGPPOPT(*LVL1), or *LVL2, on the CRTSQLRPGI.

*---------------------------------------------
* M o d u l e i n t e r f a c e
*---------------------------------------------
/if defined(prototypes_only)

/if defined(mymodule_h)
/eof
/endif
/define mymodule_h

[prototypes, constants, data structure templates etc]

/eof
/endif

*---------------------------------------------
* M o d u l e i m p l e m e n t a t i o n
*---------------------------------------------
H keywords
Ffiles
/define prototypes_only
/copy mymodule
D more definitions
etc


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.