For some reason, I like to have the name of the procedure on the ending P-spec. I suppose it's another tool to help me navigate code.
That said, it's a pet peeve of mine to see the procedure name repeated on the PI. I guess I don't see a reason for it. I'd prefer to have the whitespace there.
In 6.1 IBM has introduced local F-Specs which appear between the P spec and the D-spec with the PI and parms. This now pushes the parameters deeper into the procedure. It would be nice if RPG was enhanced to allow for a P-spec to house the PI (in addition to the D-spec for sake of backwards compatibility). That way we could have the parameters be the first thing in the procedure.
Look at CL. First thing you have (after comments) are your parameters if you have any. That's pretty nice. RPG once required them way down in the C-specs, then gave us the option to list them in the D-specs, which I really liked. But ultimately, if the parameters appeared at the beginning of the procedure (as they do in CL, C++, Java), I think the presentation of code would flow smoother.
Guess I have another IBM request to go make - for an O/S level I'm not even on yet.
Kurt Anderson
Sr. Programmer/Analyst
CustomCall Data Systems
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Rory Hewitt
Sent: Thursday, May 28, 2009 11:37 AM
To: RPG programming on the IBM i / System i
Subject: Re: Sub procedure end specification
I'm with Alan on this one. I can *maybe*, under certain *very
limited*circumstances, see the benefit of putting the procedure name
in the end-P
line, but I can't *stand* people putting the procedure name in the PI line
of a subprocedure - it's not like the name isn't ONE LINE ABOVE anyway.
Rory
On Thu, May 28, 2009 at 8:56 AM, Alan Campin <alan0307d@xxxxxxxxx> wrote:
This stuff drives me crazy. Why repeat the name of the procedure name three
times? I don't know of any other language that allows you to do that. What
purpose does it serve except cluttering up the code? I have no idea why IBM
even allow it.
As an Amazon Associate we earn from qualifying purchases.