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



Let's not start a rumor that I want C instead of RPG. I was simply
stating that (in broader terms here) that even a poorly conceived syntax
of a language like C doesn't require semi colons at the end of
conditional statements.

My favorite is PL/I which also doesn't require them on conditional
statements.
>From what I hear from IBM, they don't have technological reasoning
behind most enhancements that have been implemented but rather they do
them for one of several reasons, including but not limited to:

It's the best way to do it.
It's a good enough way and we've run out of time to make it better.
It's the way Hans wants it <g>.
We RPG programmers are too dumb to figure out the right way, so we'll do
it this other way.


I'm sure there's more reasons but those are the one's I've heard of from
several X-IBM Language Lab people.

Bob Cozzi
cozzi@rpgiv.com
Visit the new on-line iSeries Forums at: http://www.rpgiv.com/forum

> -----Original Message-----
> From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]
On
> Behalf Of Jim Langston
> Sent: Friday, September 21, 2001 11:07 AM
> To: rpg400-l@midrange.com
> Subject: RE: (no subject)
>
> RPG doesn't use brackets { } or other statement groupers,
> thank goodness.  Since RPG doesn't use statmenent groupers, it
> needs definate end of statement terminators.
>
> This isn't C, like Hans said.  If you want to program in C,
> program in C (I do at home).  This is RPG, or whatever RPG is
> becoming.  Do we really want another C clone?  I don't think so.
>
> Remember, you should be able to code your example:
>   IF   A=B;
>   Eval  X = C * D;
>   Else;
>   X = C * B;
>   Endif;
>
> as
>
>   IF   A=B;  X = C * D;
>   Else;      X = C * B;
>   Endif;
>
> in theory if you wanted to (I wouldn't but you could), although
> I'm not certain "they"ve taken freeform that far yet.  (Took me
> a little scratching of my head before I realized you stuck an
> Eval in there <g>).
>
>
> Regards,
>
> Jim Langston
>
> -----Original Message-----
> From: rpg400-l-admin@midrange.com
[mailto:rpg400-l-admin@midrange.com]On
> Behalf Of Bob Cozzi (RPGIV)
> Sent: Friday, September 21, 2001 6:30 AM
> To: rpg400-l@midrange.com
> Subject: RE: (no subject)
>
>
> Hans,
>
> No offense, but yes, this was the first example I've seen of the free
> form stuff. I had seen something in the manual, but it was mostly
> contrived and not clear enough.
>
> Sure I noticed and accepted a semi colon after the CHAIN or EVAL or
most
> other operation codes. But looking at the code posted here, and seeing
a
> semi colon after the IF conditional statement, cause me to do a double
> take.
>
>   IF   A=B;
>   Eval  X = C * D;
>   Else;
>   X = C * B;
>   Endif;
>
>
> It just seems unnatural to me. I would have expected the parse to have
> been able to determine the end of the conditional clause and then
accept
> a "command" statement next. Which of course, could be on the next
line.
> That command statement would then be followed by a semi colon.  The
same
> holds true for the ELSE, SELECT, WHEN, ELSEIF statements. I guess
there
> would be ambiguity on the ENDxx statement (to semi colon or not to
semi
> colon <g>).
>
> I suppose the syntax you have is adaptable to the alterations
> (enhancements?) that I'm suggesting here, since it would continue to
> work if you added this change.
>
> Hans, as I stated publicly before, I think IBM did a good enough job
> (save this recent discovery) with the free-form syntax. It is much
> better than any of the previously viewed "grammas" that I saw.
>
> Of course since you apparently don't like to hear my comments, you've
> decided to no longer keep me in the early review loop, so don't blame
me
> if I'm seeing things here for the first time.
>
> As to the C language, well RPG IV is still my favorite, with C++ a
close
> second. I don't think I write in plain old C anymore, but I suppose
C++
> is syntactically similar. Just because one language does something
> questionable (like the lack of garbage collection) doesn't justify it
> being implemented in another language. Its funny you use my platform
for
> why RPG IV did NOT need free form ("if you like C, use it") I've been
> saying that for 10 years. Glad to read you're quoting me on something.
> <vbg>
>
>
> Bob Cozzi
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.



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.