|
Von: jon.paris@xxxxxxxxxxxxxxall
An: rpg400-l@xxxxxxxxxxxx,
Datum: 10.10.2013 15:05
Betreff: Re: Free format H, F, D and P specs
Gesendet von: rpg400-l-bounces@xxxxxxxxxxxx
On 2013-10-10, at 3:02 AM, thomas.raddatz@xxxxxx wrote:
Stuart and Vern,
What's up? Everyone wants something, IBM delivers a solution, and
that(I
know, not everybody) we get is carping at what it is.
Of course everybody wants to get totally /free and hence voted for
example:enhancement. On my opinion the problem is, that IBM's solutions are
sometimes somewhat "complicated" or let us say "strangely". For
a) if/endif, select/endsl, etc.
Why do we have to add a semicolon to the IF and ELSE statements? Other
rehash?languages use brackets for that and the semicolon is used to end a
statement. A single IF is not a complete statement.
This has been discussed to death years ago - do we really need to
'P'
It was needed in part because RPG's columnar past and very relaxed
reserved word rules meant that the parser needed to know where an
op-code began because there were many programs that used variable
names such as READ, WRITE, OPEN, etc.
Alternatives such as OP(READ) FILE(CUSTOMER) etc. were far worse.
b) P/D specs
Why do we need to use 'P' and 'D' specifications to start a procedure?
returnfor procedure is great and actually the input parameters and the
value belong to the signature of the procedure. So why use 'D'
specifications for that?
Because? Again - this is now 15 year ancient history. If you want
to argue that the whole past should have thrown away and a new RPG
that looked just like C/Java be designed I won't agree with you -
but at least you'd have a point worth debating.
c) Full qualified names
Actually great stuff, but does not work with LIKE, LIKEDS, %size() and
nobody%elem():
D address_t ds qualified template
D firstname 50a varying
D lastname 50a varying
D city likeds(city_t)
D street 50a varying
D city_t ds qualified template
D zip 10a varying dim(100)
D name 50a varying
D address ds likeds(address_t)
// The simple qualified name is not specified correctly.
D tCityName s like(address_t.city_t.name)
D size s 10i 0
D elem s 10i 0
/free
// The simple qualified name is not specified correctly.
size = %size(address.city.name); // error
elem = %elem(address.city.zip); // error
*inlr = *on;
/end-free
There might be good reasons for that because of the age of the RPG
compiler. But of course nobody understands that at first glance. Or
of the compiler lab uses RPG to write production code. Or the compiler
starteddevelopers are too close to RPG.
There are a couple of things that have been quite tricky when I
with my WSDL2RPG and especially the lack of full qualified names for
%elem() and %size() is very hard.
I agree and I'm sure the team want to ultimately fix it. I'm not
sure why the compiler can't handle it.
Just my two cents.
Thomas.
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.