After having closed my laptop and driven to work I would now like to retract my previous post.
My mind works like a silt-filled lake. It takes a while for the water (and my thoughts) to clear.
It also would help if I read your post thoroughly before commenting.
gCUSTOMER_TYPE_TEACHER is much better than gCSTTY_TEA
And 'gA' to represent 'A' is of no value at all.
Paul
Paul Therrien
Orion South, Inc.
504-374-9551
800-437-7173
ptherrien@xxxxxxxxxxxxxxx
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of paultherrien@xxxxxxxxxxxxxxxxxx
Sent: Tuesday, April 24, 2012 8:05 AM
To: 'Midrange Systems Technical Discussion'
Subject: RE: standards for coding constants
Without looking at anyone else's responses I have to say I don't understand what your post is driving at. Do you not like the name of the constant?
Paul
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Dave
Sent: Tuesday, April 24, 2012 7:43 AM
To: Midrange Systems Technical Discussion
Subject: standards for coding constants
Here's an example of our shop's RPG code :
IF wCstTy = 'TEA' ;
Means if the customer type indicates a teacher. Cst for customer, Ty for type, w for local variable.
I would write this way, using a globally defined constant :
IF wCstTy = gCUSTOMER_TYPE_TEACHER ;
I proposed that we create a copybook for such constants so that everyone would use the same names and to avoid seeing this kind of thing :
D gA C CONST('A')
My wish was granted, and a copybook has been created. But now, I can't use the constant in my example above. I now have to write :
IF wCstTy = gCSTTY_TEA ;
I feel like I'm bashing my head against a brick wall.
Any comments to make me see the error of my ways would be more than welcome.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.