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



Of course it is redundant and a waste of time and code to comment by repeating the operation. Comments are for explaining things that are not obvious, and a comment header for a prototype, which is what I think the OP is talking about - this IS the place to explain why - to state the purpose and the contract with the caller of the procedure.

Inside the procedure, if I am using some way of organizing data in a string, and it cannot be done with a data structure (elements have varying lengths), then I need to document that with appropriate comments. I think that is the kind of thing you are talking about, right?

But something like this -

somevariable = 5; // set somevariable

is just silly but is often done, so I have heard.

:)

Vern

On 3/23/2012 8:37 AM, Michael Schutte wrote:
And the documentation could do that exact same thing if all you do is
explain the code instead of explaining why you did what you did.


Proc123 = bad. UpdateBOLCarrier is pretty clear. What do you document?
Procedure Updates BOL Carrier! Waste in my opinion.




On Fri, Mar 23, 2012 at 9:00 AM, Alan Shore<ashore@xxxxxxxx> wrote:

That would make perfect sense. Unfortunately, one person's
self-explanatory is another person's gobble-de-gook.

Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Michael Schutte
Sent: Friday, March 23, 2012 8:54 AM
To: RPG programming on the IBM i / System i
Subject: Re: commenting sub procedures

Screw documentation... Make the procedure self explanatory.



On Fri, Mar 23, 2012 at 8:14 AM, Vern Hamberg<vhamberg@xxxxxxxxxxx>
wrote:

Hi Dave

I would put them in both the prototype AND the procedure. Prototypes
are often collected in a single /include member - you need the
comments there, too.

This is what the wizard in RDP does - it creates a comment header on
both. I find that useful myself.

Vern

On 3/23/2012 3:13 AM, Dave wrote:
Hi,

Where do you all put your comments on your sub-procedures? In the
prototype, or in the procedure itself? Ours have always been in the
prototype, which I have never liked as they are too far away from
the code. We haven't yet got V7.1 but given that the internal
procedure prototypes become unnecessary, it seems like comments
should not be placed in the prototype.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.


Disclaimer: This message contains confidential information and is intended
only for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please notify the
sender immediately by e-mail if you have received this e-mail by mistake
and delete this e-mail from your system. E-mail transmission cannot be
guaranteed to be secure or error-free as information could be intercepted,
corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
The sender therefore does not accept liability for any errors or omissions
in the contents of this message, which arise as a result of e-mail
transmission. If verification is required please request a hard-copy
version. Any views or opinions presented are solely those of the author and
do not necessarily represent those of the company.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.