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


  • Subject: Re: Is this the Free-Format that we asked for?
  • From: "John Taylor" <john.taylor@xxxxxxxxxxxxxxx>
  • Date: Thu, 2 Nov 2000 14:09:47 -0700

For those of you without access to AS400 Network, here is the message posted
by Hans that offers the reasoning for this design decision:

<Start of Quote>

Regarding the GOTO, I had that in the original design, but someone thought
that since we were pruning out other stuff that was considered "bad style",
GOTO should also be omitted. I agree it can be fine if used correctly, but
there are plenty of alternatives: LEAVE, ITER, RETURN, and LEAVESR. By
coding reasonably compact procedures and modestly nested loops, the need for
a general GOTO is much reduced.

Regarding the semicolon, programming languages generally need either a) a
syntactical token that ends a statement or b) some indication of statement
continuation. Our original design used a + in position 7 to indicate
continuation (like the SQL prep), but that design was generally disliked
(even though tolerated, at least for a while). Some languages, like REXX or
Python require a comma at the end of a line to indicate continuation. Or
continuation is implied if an expression is incomplete. But these schemes
tend to be a bit confusing. We finally decided that if the semicolon was
good enough for PL/I, it would be good enough for RPG, and we went with
that. Another consideration is that compilers can generally make more sense
of an ill-formed program if the language has some way to synchronize the
parse after finding errors.

<End of Quote>

And here is what I have replied with on the forum thread:

Sorry for not responding directly under your post earlier. I presumed that
you would just jump in elsewhere in the thread.

So let me see if I understand this completely...

The GOTO was removed because:

1) Someone on the development team considered it "bad style".


The semicolon will be used because:

1) Someone disliked having to code an "+" to continue the occasional
multi-line statement.

2) It was good enough for PL/1 (what a resounding commercial success), so
RPG might as well use it.

3) This will help the compiler "make sense" of an ill-formed program. I
presume in a way that is superior to languages that don't use a semi-colon?

Before I continue to waste any more time on this issue, let me first ask you
this; has the design been written in stone at this point?

In other words, is the purpose of this forum for us to have some impact on
what you deliver, or simply to oohhh and aahhh over it after the fact?


Regards,

John Taylor
Canada










+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.