× 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.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.