Re: Caps convention.

From: Thomas Matthews (Thomas_MatthewsSpamBotsSuck_at_sbcglobal.net)
Date: 12/20/03


Date: Sat, 20 Dec 2003 18:30:37 GMT

Malcolm wrote:
> Use all lower case for ansi c functions, and Capitalise For
> Platform-Specific.
>
> If you call something with caps, then your function name requires caps
> itself.

The common style is to use all-caps for constants and macros.
Function name styles differ:
   leading word starts lowercase followed by Capitalized words:
          thisIsMyFunction
   same thing, using underscores:
          this_Was_My_Function
   starting with Captials:
          ThisIsAnotherFunction
          This_May_Be_More_Readable
   as you suggested:
          anansicfunction
          another_ansi_function

However, most all good coding styles don't permit function names
to start with '_' (underscores) as these are reserved for
implementations.

This is a religous issue: all a matter of faith. As long as you
are consistent and the names are readble, any style will do. Just
as there is no best religion, there is no best coding style.

-- 
Thomas Matthews
C++ newsgroup welcome message:
          http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq:   http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
          http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
     http://www.josuttis.com  -- C++ STL Library book
     http://www.sgi.com/tech/stl -- Standard Template Library


Relevant Pages

  • horizontal line
    ... I've been reading the sci.electronics.repair faq, ... there's no vertical deflection. ... I found 2 caps with high esr/leakage. ...
    (sci.electronics.repair)
  • Re: SOME STUFF ABOUT REISER4 To Mr Hopper
    ... Actually we aren't blocking your email address, ... So if you stop using caps lock so much, ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: Ratings for an Amphibian
    ... C J Campbell wrote: ... FAA has a FAQ on Part 61 which addresses this, ... Just change the CAPS to. ...
    (rec.aviation.piloting)
  • Re: Caps convention.
    ... Malcolm wrote: ... > If you call something with caps, then your function name requires caps ... C FAQ: http://www.eskimo.com/~scs/C-faq/top.html ... K&R answers, C books, etc: http://users.powernet.co.uk/eton ...
    (comp.lang.c)