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


  • Subject: Re: copy member for prototypes--was RE: Date procedure
  • From: bmorris@xxxxxxxxxx
  • Date: Fri, 8 Dec 2000 13:43:05 -0500
  • Importance: Normal


>Date: Thu, 7 Dec 2000 14:13:31 -0800
>From: Joel Fritz <JFritz@sharperimage.com>
>
>I think there are several arguments for doing this.  I'm not going to say
>any of them have merit, but...
>
>1.  Shop standard forbids use of copy members. (Not as uncommon as you
might
>think.)

Then the shop standard should be relaxed at least for prototypes, or
alternatively, the shop should not use prototyped calls.  (Are shop
standards really that rigid anywhere?  How does it become possible to
even use RPG IV in such a shop?  Surely such a rigid standard must
also specify the coding language.)

>2.  Aid to maintenance by persons unfamiliar with RPGIV, especially
>conditional compilation directives.

The "aid" is far outweighed by the loss of the parameter-checking aid
to maintenance.  Anyway, compilation directives are easy compared
to prototypes.  And double anyway, /COPY isn't new.  And triple anyway,
people that unfamiliar with the language shouldn't be maintaining it.
And quadruple anyway, you only have to learn how this works once.

>3.  Makes program easier to understand for some one who first sees it at
2AM
>after receiving a support call.

You just need a standard for where you put your prototypes.  Some
standards that work ok:
  a. for LIB/SOURCE,MODULE1, prototypes are in LIB/SOURCECPY,MODULE1
  b. all prototypes are in one source member, PROTOTYPES
  c. for LIB/SOURCE,MODULE1, prototypes are in LIB/SOURCE,MODULE1_P
  d. if you already have a naming convention where say suffix "R"
     means "RPG", add a suffix, say "P", so AR001R's prototypes
     would be in AR001P.

>4. A small program with sub procedures defined in the same source member
as
>the main program/module probably is better self contained.

The prototypes for non-exported procedures shouldn't be put in /COPY
members.

>I'll bet someone else can come up with others.  Remember, I didn't
>say any of them have any merit.

If they don't have to have merit, I can come up with some more:

5. The module's aura is enhanced by having the prototype physically
   close to the procedure.  (Ideally, the PR line should be exactly
   241 lines from the P-B line, or an exact multiple of 241 lines.)
6. It's Friday.
7. Because I said so. (this is my mother's reason, similar to #1)
8. My dog ate it. (oops, wrong list)

Barbara (did I mention that it's Friday?)


+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-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 thread ...


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.