×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Hi John

In RDi, if you select the entire procedure (put cursor on DCL-PROC and press Ctrl-M), the press Ctrl-Shift-F to format the selection, the procedure interface is indented - this is how IBM sees it.

And I am happy with that - the PI is a component of the procedure, just as other declarations - not a part of the procedure declaration.

In the RDi help for procedure interfaces is this statement - "The procedure-interface definition can be specified anywhere in the definition specifications." This suggests that IBM sees a PI at the same level as variable declaraions.

That's just me - if you want to put them at the same level, just don't ever let RDi do your formatting for you!!!

Cheers
Vern

On 1/15/2018 4:22 AM, john erps wrote:
Like i said, because i feel dcl-pi is not at the same level as the dcl-s
etc of the procedure body.

It's not difficult, but i want to use one consistent formatting.
The dcl-proc and dcl-si together specify the signature and i like this
visually to be one declaration.

Maybe i'm a bit confused; in other languages such as C, you specify the
name and parms in one construct.

However, one or the other, i need to adapt one style, and apparantly most
(all?) use the dcl-pi indented format.

So that's what i'm probably going to use also.

Regards

On Mon, Jan 15, 2018 at 11:06 AM, <j.beckeringh@xxxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:

Hi John,

I don't follow your reasoning:

dcl-proc // Starting keyword; raises the indentation level to 1

dcl-pi // Starting keyword: raises the indentation level to 2
parm char(1) value;
end-pi; // Ending keyword: lowers the indentation level to 1

-body-

dcl-s field ind;

end-proc // Ending keyword: lowers the indentation level to 0
What is so difficult about that?

Joep Beckeringh
Software architect
Pantheon Automatisering B.V.
Heerenveen

john erps <jacobus.erps@xxxxxxxxx>

15-01-2018 11:00

Re: Question about dcl-proc

The parm is part of the dcl-pi block, so it's indented wrt this block.
The block itself is part of the dcl-proc, so strictly it would have to
be
indented wrt dcl-proc.
But then the body (i.e. the part after dcl-pi) should be indented like:

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