Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Using all CPAITAL letters for variable names

Reply
Thread Tools

Using all CPAITAL letters for variable names

 
 
arnuld
Guest
Posts: n/a
 
      08-27-2008
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

 
Reply With Quote
 
 
 
 
Nick Keighley
Guest
Posts: n/a
 
      08-27-2008
On 27 Aug, 07:38, arnuld <(E-Mail Removed)> wrote:

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

> 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

 
Reply With Quote
 
 
 
 
vippstar@gmail.com
Guest
Posts: n/a
 
      08-27-2008
On Aug 27, 9:38 am, arnuld <(E-Mail Removed)> wrote:
> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamic variable names or using a variable as another's name Peter Buckley Ruby 5 02-27-2009 06:05 PM
checking for mis-spelled variable names / function names News123 Python 2 11-26-2008 12:37 AM
making all letters Caps/Small Letters Merrigan Python 4 12-14-2007 10:10 AM
confusion between global names and instantiated object variable names wanwan Python 3 10-14-2005 09:46 PM
Changing from capital letters to small letters using perl Venugopal Perl Misc 11 11-05-2003 06:07 PM



Advertisments