Connecting Tech Pros Worldwide Forums | Help | Site Map

Using all CPAITAL letters for variable names

arnuld
Guest
 
Posts: n/a
#1: Aug 27 '08
I use capital letters for macros only. Is it a good idea
to use all capitals for things like constant variables and variables and
array in global namespace ?



--
www.lispmachine.wordpress.com
my email is @ the above blog.Google
Groups is Blocked. Reason: Excessive Spamming


Nick Keighley
Guest
 
Posts: n/a
#2: Aug 27 '08

re: Using all CPAITAL letters for variable names


On 27 Aug, 07:38, arnuld <sunr...@invalid.addresswrote:
Quote:
I use capital letters for macros only.
that was the original, and still widely used, convention
it is to draw attention to the fact that "something funny"
may happen because the preprocessor is involved.

*Some* people also capitalise enum values. I suppose
because the are "like" macro constants.
Quote:
Is it a good idea
to use all capitals for things like constant variables and *variables and
array in global namespace ?
IMHO, no

but then you shouldn't have many variables in the global namespace...


--
Nick Keighley

Many astrologers think that this concentration on [the sun-sign
column] has
done untold damage to serious astrology.
The Independent

vippstar@gmail.com
Guest
 
Posts: n/a
#3: Aug 27 '08

re: Using all CPAITAL letters for variable names


On Aug 27, 9:38 am, arnuld <sunr...@invalid.addresswrote:
Quote:
I use capital letters for macros only. Is it a good idea
to use all capitals for things like constant variables and variables and
array in global namespace ?
If it's *your* C project, you write the specification, and you can
make it a good idea.
If it's someone elses project, you read his/her specification, and you
figure out whether they like it or not.
C doesn't say anything about it (thus such question might be off-
topic)
Though there's things to look out for when choosing names: E?*
(where ? is a digit or capital) are reserved identifiers.
Closed Thread