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



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

> -----Original Message-----
> From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]
On
> Behalf Of boldt@ca.ibm.com
> Sent: Friday, September 21, 2001 7:58 AM
> To: rpg400-l@midrange.com
> Subject: Re: (no subject)
>
> Bob wrote:
> >Please don't tell me that they require a semi colon at the end of IF
> >conditional statements?  Not even C requires that.  :(
>
> Bob:  Give me a break!  You don't seriously expect us to believe
> that this is the first time you've seen the syntax for the /free
> calcs, do you?
>
> We spent a fair bit of time here debating the new revised syntax
> for free-form calcs, and we finally decided that the easiest rule
> to remember would be a semi-colon at the end of each and every
> statement.  No exceptions.  This way, you don't have to keep a
> list tacked to your monitor listing which statements take a
> semi-colon and which don't.
>
> You like C syntax?  Then go ahead and use C.  It too is a good
> language, but it has its quirks.  In particular, the rules
> regarding the use of the semi-colon in C aren't a model of
> consistency.
>
> Cheers!  Hans
>
> Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com
>
> _______________________________________________
> 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.