I do:
promptPrintForms( rbcnppfUSER: rbcnppfSSN:
rbcnppfSTDCD: rbcnppfPKG: (and so on) );
I tend to dislike listing every parameter on its own line.
Although in opposite fashion, I'm like Paul when dealing with a long concatenation.
myString = 'Hello my dear old friends this is quite
+ the day.';
-Kurt
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Paul Nicolay
Sent: Monday, April 11, 2011 4:16 AM
To: RPG programming on the IBM i / System i
Subject: RE: Postfixed characters ( was RPG, open source, and the web)
Count me in for the first method.
I find the second one "harder" to read as your mind needs to filter the clutter of the semicolon.
Strangly enough, when it's about concatenating strings, I usually put the + at the beginning, maybe because it indicates that the two lines are related to each other (while parameters are some sort of independant from each other).
myString = 'Hello'
+ 'world.';
Getting rid of the restrictions of the length of a line for the compiler would even be a better thing... I always found it a bit silly to move to free format, and then limit a line to a prehistoric length.
________________________________________
From: rpg400-l-bounces@xxxxxxxxxxxx [rpg400-l-bounces@xxxxxxxxxxxx] on behalf of Voris, John [john.voris@xxxxxxxxxxxxx]
Sent: Tuesday, April 05, 2011 23:59
To: rpg400-l@xxxxxxxxxxxx
Subject: Postfixed characters ( was RPG, open source, and the web)
RE: prefixed commas . . are more readable , more understandable.
So in RPG, which do people think is more readable:
promptPrintForms(
rbcnppfUSER :
rbcnppfSSN :
rbcnppfSTDCD :
rbcnppfPKG :
rbcnppfID :
rbcnppfTXNO :
rbcnppfHCOR :
rbcnppfRESULT :
rbcnppfDO_ALL )
-or-
promptPrintForms
( rbcnppfUSER
: rbcnppfSSN
: rbcnppfSTDCD
: rbcnppfPKG
: rbcnppfID
: rbcnppfTXNO
: rbcnppfHCOR
: rbcnppfRESULT
: rbcnppfDO_ALL
)
This different format is not something that can be easily customized inside your RDp editor, but code-generators /and/ snippets might work well with this format.
The main thing is not to mix the two different styles within the same section of code.
Make a logical break in the code if you are going to change the style.
- John Voris
--
This is the RPG programming on the IBM i / System i (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.