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



Not sure what you mean as you can't declare local variables twice...

Unless you're talking about parameters on the procedure interface and
prototypes... Though technically the local variable is declared only
once; in the PI section. This is perfectly acceptable though not best
practice IMHO.
d MyProc pr
d 10a

p MyProc p
d MyProc pi
d parm1 10a



I'd agree that it's a slight pain...as would IBM which is why they
removed the requirement for a PR for local procedures in 6.1 (or 7.1?)

But even if you're on an older version, it's not a big deal to create
one or the other and copy and paste, you've only goto to change PR to
PI and you're golden. Particularly with WDSCi or it's successors as
you can have multiple editable windows into the same source. So it's
easy to have one at the bottom where the procedure is being written
and one at the top where the prototype needs to go.

Lastly, WDSCi has a "New procedure" wizard that automatically creates
the PR along with the P and PI for you.

HTH,
Charles

On Wed, Jun 29, 2011 at 12:04 AM, John Yeung <gallium.arsenide@xxxxxxxxx> wrote:

I do find it painful to do without local variables.  However, I
personally find it *more* painful to jump through the hoops of
declaring my local variables... TWICE... than it is to just pick a
naming convention that prevents collisions.  (And again non-ILE RPG IV
helps with this too, with the longer names and prefix feature and so
forth.)


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.