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



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



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.