Connecting Tech Pros Worldwide Help | Site Map

Using all CPAITAL letters for variable names

 
LinkBack Thread Tools Search this Thread
  #1  
Old August 27th, 2008, 06:45 AM
arnuld
Guest
 
Posts: n/a
Default Using all CPAITAL letters for variable names

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


  #2  
Old August 27th, 2008, 08:05 AM
Nick Keighley
Guest
 
Posts: n/a
Default 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

  #3  
Old August 27th, 2008, 10:25 AM
vippstar@gmail.com
Guest
 
Posts: n/a
Default 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.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.