|
How about use a semicolon if you have more than one instruction on a line. Otherwise you don't need it.. x++; text="Free-Format" if (x=1) do this; and this; and this endif Of course, it looks like Endxx is required? hmm.... not sure I like that either. I like the curly brackets idea still. Must be all the javascript I've been doing lately. Brad > -----Original Message----- > From: Marcin Sagan [mailto:ITBAMSAG@bh.com.pl] > Sent: Thursday, November 02, 2000 8:25 AM > To: RPG400-L@midrange.com > Subject: RE: Is this the Free-Format that we asked for? > > > If we left semicolons more than one instruction per line will > be allowed. > What about ++, --, += etc., operators overload and such c stuff? > > Marcin Sagan > > >>> "Stone, Brad V (TC)" <bvstone@taylorcorp.com> 11/02 2:25 >>> > Agreed about the semicolon. Especially since the source are in eol > terminator members. In other words, finding the end of the > line isn't hard > at all. A Semicolon shouldn't be needed. > > As for the GOTOs, I'm happy to see them gone. > > If we must have semicolons, I'd also like to see the use of > curly brackets. > Just for the heckuv it. > > if (x=1) { > do this > and this > andi this > } > > Brad > > > -----Original Message----- > > From: John Taylor [mailto:john.taylor@telusplanet.net] > > Sent: Wednesday, November 01, 2000 4:01 PM > > To: RPG400-L@midrange.com > > Subject: Is this the Free-Format that we asked for? > > > > > > Folks, > > > > News/400 is hosting a feedback forum related to the new > > enhancements within > > the upcoming release of RPG 5. The forum is sponsored by IBM, > > and includes > > the participation of both Barbara, and Hans. > > > > As most of you are aware, the biggest enhancement to the new > > release is the > > free-format "CF-spec" that has been discussed at length on > > this list. Here > > is an example, straight from an article written by George > > Farr, of how we > > would code the new free-format statements: > > > > > > /free > > > > Read(n) MASTER; > > If (not %EOF); > > /copy something > > For i = 0 to num; > > x = y(i); > > EndFor; > > EndIf; > > > > /endfree; > > > > I'd like you to take notice of the semi-colon at the end of > > each statement. > > According to the new rules, each program statement MUST > > terminate with a > > semi-colon - ala C/Java. > > > > The only reason that Java required this at all is because it > > was designed to > > closely resemble C syntax, in order to facilitate adoption of > > the language > > by existing C programmers. Why C had it in the first place is > > beyond me. But > > now we're being shackled with the same superfluous baggage. > > > > There is no shortage of free-format languages that have > > managed to do the > > job without requiring the programmer to type an explicit end > > of statement > > character. Why does RPG need one? Think about this folks. > > EVERY SINGLE LINE > > of code needs the new terminator. How many extra keystrokes > > will that amount > > to in a given day of coding? And what is it gaining you? NOTHING! > > > > One other point that should be brought to your attention is > > the elimination > > of the GOTO statement from the free-format specifications. > > How many of you > > have code that looks like this: > > > > P DataOk B > > PI N > > > > * Clear error conditions > > C Clear GlobalErrStruct > > > > * Perform an edit > > C If Not SomeCondition > > C Eval MsgID = 'ERR1000' > > C Eval MsgData = 'MyDiagData' > > C Eval CursorOnField1= *On > > C Goto Proc_Error > > C Endif > > > > * Perform a bunch of other edits > > > > * Clean up & Exit > > C Return *On > > > > * Errors found > > C Proc_Error Tag > > C Eval GenErrorID = *On > > C CallP SndDiagMsg( MsgID: > > MsgData: '*CALLER') > > C Return *Off > > > > P DataOk E > > > > > > Granted, it's not the only way to accomplish the goal, but > > (IMO) it is clean > > and simple. You may choose to do it using nested IF's, or one > > big SELECT, or > > a handful of other ways. But the point is that you have a > > choice. Now, IBM > > has decided to take away one of our choices in the matter. > > > > If any of you have an opinion with respect to either of these > > limitations, I > > urge you to speak up now. Once released, the chances of us > > getting this > > changed will be slim for the GOTO, and absolutely NONE for > > the statement > > terminator. > > > > Ideally, you can participate in the feedback forum at > www.as400network.com > to share your opinions. If you can't do that, then please > share them on this > list; since we know that Hans & Barbara monitor it. > > > 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 > +--- > +--- > | 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 > +--- > > > > > > > > > > > > > > > > ! > ! > > > > > > > > > > > > > > > > ! > ! > > > > > > > > > > > > > > > > ! > ! > > > > > > > > > > > > > > > > ! > ! > > > > > > > > > > > > > > > > ! > ! > > > > > > > > > > > > > > > > ! > ! > > > > > > > > > > > > > > > > ! > ! > > > > > > > > > > +--- > | 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 > +--- > +--- | 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 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.