×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
On 4/5/2011 5:59 PM, Voris, John wrote:
So in RPG, which do people think is more readable:
promptPrintForms(
rbcnppfUSER :
rbcnppfSSN :
...
-or-
promptPrintForms
( rbcnppfUSER
: rbcnppfSSN
...
I think the colon at the beginning is more readable.
I also code logical operators at the beginning of a line, with the
logical nesting shown by indentation:
if x > 0
and arr(x) > 1
or y > 0
and arr(y) > 1
And for concatenated strings in RPG and Java, I put the + at the beginning:
cmd = 'dsppfm '
+ 'file(' + filename + ') '
+ 'mbr(' + mbrname + ') ';
And if a parameter list also involves concatenation, I either use a temp
to avoid having concatentation in the parms, or use indentation.
doCommand ('dsppfm '
+ 'file(' + filename + ') '
+ 'mbr(' + mbrname + ') '
: allowError_YES);
But strangely, I cannot abide leading commas in C and Java.
I really really hate the look of this:
promptPrintForms
( rbcnppfUSER
,rbcnppfSSN);
I realize this is completely irrational, and that I should learn to
embrace leading commas. I see intellectually that they are better. But
brrrrrr, make them go away.
As an Amazon Associate we earn from qualifying purchases.