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



Matt

I was thinking along the same lines, about a procedure declaration - make it like the call.

Of course, the present change keeps the look very like the old D-spec for declaring a procedure.

Easy enough? :)
Vern

On 10/10/2013 1:07 PM, Matt Lavinder wrote:
On 10/7/2013 11:47 AM, Scott Klement wrote:

-snip-
B U T . . .

The issue I have with the free-form procedure definition isn't the lack
of brackets but its lack of consistency RPG itself. I could let it
slide when it was fixed, but I have a much a harder time doing that now.

I know WHY it looks the way it does (to be compiler friendly), but that
doesn't make it less ugly. I am perfectly fine with dcl-proc...end-proc
and I don't feel any overwhelming need for curly brackets. I do think
though that in lieu of dcl-pi and end-pi you should be able to use open
and closing parenthesis and then separate the parameter definitions by
colons.

That just makes sense. I can't really think of a language where the
procedure definition is radically different from the procedure call.

To me, this is absolutely how the procedure definition should look. At
least give the option to do it this way:

dcl-proc transform(
*n varchar(50) :
name varchar(10) const options(*trim) :
);

return '*** ' + name + ' ***';
end-proc;

// the call
transform(somvar:'My Name');

See the consistency? Maybe one might argue that my suggestion is
preference, but uniformity between the procedure definition and the
procedure call is pretty much a standard EVERYWHERE. So, you'll have to
excuse me I disagree that this is a "preference". The fact that you
declare a procedure one way and then call it another WILL absolutely,
without question, bug young programmers. Count on it.
-snip-
Go easy on me. :)





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.