|
I almost agree with Alan. Although I do not necessarily need a new
compiler I think that IBM again missed a good chance to really modernize
/free. For example from the day when IBM introduced procedures with V3, I
wonder why we have to use P specs to start/end a procedure and D specs for
the procedure interface. Using only P specs whould have been a lot easier
and clearer (at least for me):
Prototype:
P startsWith...
P P N
P i_prefix 4096A const varying
P i_string 4096A const varying
Implementation:
P startsWith...
P B N export
P i_prefix 4096A const varying
P i_string 4096A const varying
/free
/end-free
P E
I do not believe that having done it this way would have have been much
more expensive.
What I want to say is that on my opinion IBM tends to stay to close to the
old things. IBM prefers using START/END tags where other languages uses
brackets which are often clearer to read. For example:
ctl-opt dftactgrp(*no);
ctl-opt main(main);
dcl-proc main(caller_name char(10) const) {
dcl-c RECORD_LEN 80;
dcl-f qprint printer(RECORD_LEN);
dcl-ds prtDs len(RECORD_LEN) qualified {
*n char(6) inz('Hello'),
name char(50),
};
prtDs.name = transform(caller_name);
write qprint prtDs;
*inlr = '1';
dcl-proc varchar(50) transform(
name varchar(10) const options(*trim)) {
return '*** ' + name + ' ***';
};
Actually there is no need for 'dcl-pi'. There are only procedures and the
main procedure is indicated by 'ctl-opt main(main)' or even just by name:
'main'.
I do not know much about building professionell parsers and compilers but
I do not think that my example would have been that much expensive.
'dcl-proc' is the same and instead of 'end-proc' the compiler had to look
for the closing curly bracket. 'dcl-pi' and 'end-pi' are replaced by
brackets, too.
Just my two cents.
Thomas.
PS: Here is what I actually wished to get:
options dftactgrp(*no), main(main);
procedure main(caller_name char(10) const) {
const RECORD_LEN 80;
file qprint printer(RECORD_LEN);
structure prtDs len(RECORD_LEN) qualified {
*n char(6) inz('Hello'),
name char(50),
};
prtDs.name = transform(caller_name);
write qprint prtDs;
*inlr = '1';
procedure varchar(50) transform(
name varchar(10) const options(*trim)) {
return '*** ' + name + ' ***';
};
rpg400-l-bounces@xxxxxxxxxxxx schrieb am 07.10.2013 21:57:18:
Von: jon.paris@xxxxxxxxxxxxxxof
An: rpg400-l@xxxxxxxxxxxx,
Datum: 07.10.2013 21:57
Betreff: Re: Free format H, F, D and P specs
Gesendet von: rpg400-l-bounces@xxxxxxxxxxxx
Simple question to ask yourself Alan - how much would you pay for it?
Your requirement would all but double IBM's maintenance requirements
and thereby costs. Where do the $ come from?
On 2013-10-07, at 2:28 PM, Alan Campin <alan0307d@xxxxxxxxx> wrote:
The following is my opinion only.
What I don't like about the announcement is that it is in the same
language, RPG IV. I think IBM should have come out with a new version
NoRPG, RPG V or maybe RPGM for RPG Modern with all the free form syntax.
yousupport for fixed format at all and all the old garbage out of the
language. A clean spec. A modern compiler built for multi-treading. If
Usewant to write modern go with the new language. Maintaining old stuff.
wrote:RPG IV or RPG III.
On Mon, Oct 7, 2013 at 11:58 AM, Luis Rodriguez <luisro58@xxxxxxxxx>
/END-FREE
On Mon, Oct 7, 2013 at 1:17 PM, Jon Paris <jon.paris@xxxxxxxxxxxxxx>
wrote:
on
Agree 100%. What I like most of the new syntax is that the /FREE
managementcombo won't be needed anymore. Nice!! Now, if I only could make
aagree on a new IBM i :-(
On the other hand, maybe the "hype" before the real announcement was
somelittle too much. I was hoping something with more "substance". Maybe
(RPG400-L)new BIFs or something like that...
Regards,
Luis Rodriguez
IBM Certified Systems Expert ? eServer i5 iSeries
--
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(RPG400-L) mailing listmailing list--
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
This is the RPG programming on the IBM i (AS/400 and iSeries)
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying, distribution, or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and email confirmation to the
sender.
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
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 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.