. . . .for declaring variables I would prefer more like
char var1 len(3)
varchar var2
dec var3 len(3,2)
to bring it up to more of the likes of C#, Java, and PHP.
I totally agree with Duane Christen and Luis Rodriguez and Buck and
the statement from Mike Wills above. But at this point, 5 years after
free-form, I do not want to have to retrain my fingers to do variable
declarations in another style (teach my fingers WHAT? again). For code
consistency, and to keep from losing my mind learning one more new
variant of coding ( PHP, Java, VBA ), I may just avoid the newer style
and stick with good ole' D-specs to save my sanity.
For a coding style, I have found that creating my own subprocedures
.aka. My own BIF's that look like the VB keywords isBlank(),
isNotBlank(), isZero(), isNotZero() is the most helpful for me to read
my own code. Since RPG will not be a true OOP language, VB is the
closest I can think of what RPG is evolving into. And that is what I
think my RPG code most looks like.
But . . . .
What I really, really would have liked is in the D-spec to allow
comments on the right . . .
to allow a D-spec keyword TEXT('Description') -or- allow us to put to
the right-hand side // Description
rather than wasting another line of source, and then confusing
maintenance pgmrs with
"Does the comment line go to the line above or the line below?"
I really do not see a lot of use for Free-Form D specs - unless we can
code them in the body of the calcs (RPGIII
style, anyone) when I am actually using them, similar to the Java NEW.
But isn't one reason we have the D-Spec
is get away from variable definitions in the C-spec? Only a good IDE
can keep D-spec and embedded definitions consistent,
and right now there is no standard IDE for SystemI (SEU, WDSc, RDi,
RPGedit). Thank goodness the compiler is standard
(RPGLE is RPGLE, whether free-form or not, unless it is SQLRPGLE).
Playing devil's advocate, I can't see where more
inconsistencies will lead us and our 10 year old? 20 year old?
codebase into a better and more consistent coding style,
and into a brighter and happier world overnight.
And face it, IBM will probably come up with a compromise with a
compiler directive " /FreeV " just to satisfy everyone,
including the /Copybooks of our Prototypes done in D-Specs. Don't
forget those important components in the codebase of
already working code.
</End-Rant>
As an Amazon Associate we earn from qualifying purchases.