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




Very good reply. Your suggestion of "dcl-proc" is absolutely clean and
straightforward.

Thomas.

rpg400-l-bounces@xxxxxxxxxxxx schrieb am 10.10.2013 20:07:35:

Von: mlavinder@xxxxxxxxxxxxxxxxxxx
An: rpg400-l@xxxxxxxxxxxx,
Datum: 10.10.2013 20:09
Betreff: Re: Free format H, F, D and P specs
Gesendet von: rpg400-l-bounces@xxxxxxxxxxxx

On 10/7/2013 11:47 AM, Scott Klement wrote:
IBM has announced support for free format in the H, F, D and P specs
this morning. Check it out
https://ibm.biz/BdDMwB


I don't really get the back and forth about brackets C-like syntax.
Coming from a .NET/Java background and then learning RPG, lack of curly
brackets and the use of colons never bothered me. I don't feel that RPG

needs to be C-like. People are obviously free to feel that would help,
but as a young guy than learned RPG in the last 10 years, it wouldn't
have mattered to me.

Like .NET / Java programmers Jon mentioned, the thing that BUGGED me to
death was having to break out of a free form grove every time I wanted
to declare a procedure. Even with my object-oriented background, I
initially resisted procedures and used sub-routines just to keep the
free-form flowing (not the brightest decision). Being able to do
procedures without leaving free is a huge step forward, without
question. What is being added is very, very positive and I am happy
about it.

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.

I am not nitpicking or swearing a boycott. I will use the free-form
procedure definition the way it is, but hopefully people (specifically,
IBM people) will see and understand the point I am making here. I am no

compiler expert, but I have a hard time seeing why the above would be SO

hard to implement. That's probably due to ignorance, but I can say the
syntax isn't radical. It simply follows the pattern that already
exists.

That all said, happy to see this finally happen. The mini-rant above
isn't a deal breaker. Far more happy about this than frustrated, but
had to get this out there.

Go easy on me. :)



--
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: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying, distribution, or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and email confirmation to the sender.

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.