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



David,

I'm certain I missed something in this thread, but regarding naming
conventions, I think you're still missing the point of clarity...

I understand that you want to test a field for a specified value. In
this case, the character literal 'X0'. Instead of naming your constant
to be a variation of the actual value, you should consider what the
value 'X0' represents. X_FOLLOWED_BY_ZERO is just as bad as cX0, imo.
It tells me nothing about what this value means. What *IS* 'X0'?

Here's a little blurb from Code Complete by Steve McConnell that gives
some useful guidelines for naming.
http://flylib.com/books.php?ln=en&n=2&p=823&c=105&p1=1&c1=1&c2=334&view=
1

hth,
-Eric DeLong


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of David FOXWELL
Sent: Friday, September 03, 2010 9:09 AM
To: RPG programming on the IBM i / System i
Subject: RE: Does the recommendation against variable names starting
withSQL apply to constants?

-----Message d'origine-----
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Dennis Lovelady

Hi, Charles. I agree to a point.

My response was to the concept of searching through source
looking for something that might be confusing. If I were in
there working on the program, that's one thing, and I would
definitely give it a better name than cX0 or
X_FOLLOWED_BY_ZERO. But to scan source, find something I
don't like, and change the program on that basis... bad idea
in my opinion.


Dennis, r u sure u red my post? I WAS in there, as u say.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.