|
Ok.
Thanks for the responses everyone.
It's clear what i need to do.... update 100's of procedures (yes auto
formatting but no).
On Tue, Jan 16, 2018 at 1:16 AM, Stuart Rowe <rowestu@xxxxxxxxx> wrote:
I like to indent the pi simply because it makes the dcl-pi and end-piline
up (right adjusted) under the dcl-proc.block.
On Mon, Jan 15, 2018 at 12:48 PM, Mark Murphy <jmarkmurphy@xxxxxxxxx>
wrote:
The parm is part of the dcl-pi block, so it's indented wrt this
toThe block itself is part of the dcl-proc, so strictly it would have
belike:
indented wrt dcl-proc.
But then the body (i.e. the part after dcl-pi) should be indented
block,
dcl-proc
dcl-pi
dcl-end
-body-
dcl-s field ind;
end-proc
Not sure I follow with this. The -body- is not part of the dcl-pi
prettytherefore, it should not be indented wrt to the pi block. And I am
block.sure you can not put the body ahead of the other declarations within awrote:
procedure.
I prefer the RDi way:
dcl-proc
dcl-pi
end-pi
-additional declarations-
-body-
end-proc
On Mon, Jan 15, 2018 at 4:59 AM, john erps <jacobus.erps@xxxxxxxxx>
The parm is part of the dcl-pi block, so it's indented wrt this
toThe block itself is part of the dcl-proc, so strictly it would have
belike:
indented wrt dcl-proc.
But then the body (i.e. the part after dcl-pi) should be indented
hasforautomatisering.nl
dcl-proc
dcl-pi
dcl-end
-body-
dcl-s field ind;
end-proc
but this more practical (and clearer):
dcl-proc
dcl-pi
dcl-end
-body-
dcl-s field ind;
end-proc
The dcl-proc and dcl-pi constructs shoud have been one declaration
construct.
On Mon, Jan 15, 2018 at 10:29 AM, <j.beckeringh@pantheon-
wrote:
Hi John,
To me it is quite simple: procedure interface has its own keywords
procedurestart and end, which should be placed between start and end of
languagesdeclaration. 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
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
thatthe
same
indentation level as the procedure body. For me it would seem
affiliatetheaffiliate
proceduresecond example is more logical, because dcl-pi is part of the
(RPG400-L)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)
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
(RPG400-L)link: http://amzn.to/2dEadiD--
This is the RPG programming on the IBM i (AS/400 and iSeries)
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
(RPG400-L)link: http://amzn.to/2dEadiD--
This is the RPG programming on the IBM i (AS/400 and iSeries)
--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
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
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 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.