|
Hi Peter, Yes... and No. Your example works because the continuation takes place at the end of a complete token; in this case - the last closing parentheses. If the break took place within a literal, then you would need to add a "-" or a "+". The "+" would cause continuation to start with the first non-blank character of the continued field(s), whereas the "-" starts at the first available position and includes the blanks. ie: eval a = %substr(c:1:5) + 'My text' would not work, but eval a = %substr(c:1:5) + 'My+ text' would. The rules are different yet again for continuation that involves names. You need an ellipsis on the end. ie: Eval ThisIsAReallyLongFieldNameThat DoesNotFitOnOneLine = "Mytext" would not work, but Eval ThisIsAReallyLongFieldNameThat... DoesNotFitOnOneLine = 'Mytext' would. What I would have preferred to see, rather than the semicolon on the end of every statement, is a blank space, plus an underscore, for continuation only. For example: a = _ %substr(c:1:5) _ %substr(d:5:10) a = %substr(c:1:5) + 'My' _ + 'text' ThisIsAReallyLongFieldNameThat _ DoesNotFitOnOneLine = 'Mytext' I wouldn't have any objection to a semicolon being used to separate multiple statements per line - should the compiler ever support that. Such as: a = "A"; b = "B" In any event, I consider this discussion a waste of time at his point. Hans has made it perfectly clear (on the web forum) that the semicolon is here to stay - period. From IBM's perspective, the topic is not open for discussion, so why continue beating our heads against the wall. Regards, John Taylor Canada ----- Original Message ----- From: "Peter Dow" <pcdow@MailAndNews.com> To: <RPG400-L@midrange.com> Sent: Friday, November 03, 2000 13:01 Subject: Re: Is this the Free-Format that we asked for? > Hi John, > > Aren't we already writing multi-line statements with no continuation > character and no termination character? > > c eval a = > c %substr(c:1:5) + > c %substr(d:5:10) > > Note that the + sign is not a continuation character, it's a concatentation > character. > > Regards, > Peter Dow > Dow Software Services, Inc. > 909 425-0194 voice > 909 425-0196 fax > > +--- | 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.