Using all CPAITAL letters for variable names

Discussion in 'C Programming' started by arnuld, Aug 27, 2008.

  1. arnuld

    arnuld Guest

    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 ?
    arnuld, Aug 27, 2008
    1. Advertisements

  2. 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.
    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
    Nick Keighley, Aug 27, 2008
    1. Advertisements

  3. arnuld

    vippstar Guest

    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-
    Though there's things to look out for when choosing names: E?*
    (where ? is a digit or capital) are reserved identifiers.
    vippstar, Aug 27, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.