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



IMO the DCL-PI is declaring the procedure interface for the procedure, so
should be indented within the procedure declaration. The DCL-PR you may
need elsewhere is outside of the procedure definition so is not indented.

It would be nice to declare the interface of the procedure on the DCL-PROC
specification itself (as Joep says, and like the DCL-F and CTL-OPT
specifications).


-Paul.


On 15 January 2018 at 09:29, <j.beckeringh@xxxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:

Hi John,

To me it is quite simple: procedure interface has its own keywords for
start and end, which should be placed between start and end of procedure
declaration. So they should be indented.

Isn't the parm-line between dcl-pi and end-pi part of the procedure
interface? So why is that one indented?

Maybe the dcl-proc could have been implemented more like other languages
as:

dcl-proc Proc (parm char(1) value) ind;

But it wasn't :-)

Joep Beckeringh
Software architect
Pantheon Automatisering B.V.
Heerenveen

john erps <jacobus.erps@xxxxxxxxx>

15-01-2018 10:10

Question about dcl-proc

Hi,

I notice that many specify a procedure as follows:

dcl-proc Proc;

dcl-pi *n ind;
parm char(1) value;
end-pi;

code (procedure body) follows

dcl-s x ind;

...

end-proc;

Instead of:

dcl-proc Proc;
dcl-pi *n ind;
parm char(1) value;
end-pi;

code (procedure body) follows

dcl-s x ind;

...

end-proc;

The difference being that in the first example the dcl-pi part has the
same
indentation level as the procedure body. For me it would seem that the
second example is more logical, because dcl-pi is part of the procedure
declaration, not part of the procedure body, and should have the
indentation level of the procedure declaration.

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

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


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.