Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #4017

Re: macro conventions

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: macro conventions
Date 2011-05-15 06:50 -0700
Organization None to speak of
Message-ID <lnboz4gji9.fsf@nuthaus.mib.org> (permalink)
References <4dcd62ab$0$23874$bbae4d71@news.suddenlink.net> <gjpqs69uh0h50ssjml2upma865bo90epav@4ax.com>

Show all headers | View raw


ralph <nt_consulting64@yahoo.net> writes:
[...]
> The actual 'rules' and conventions are more complicated and others
> will be along shortly to quote chapter and verse. However, in order to
> avoid collisions, best practice is simply never create a macro with an
> underscore for your own use and use always use uppercase.

TO be clear, it's leading underscores that should be avoided.  FOO_BAR,
for example, is perfectly ok.  Trailing underscores are also ok, though
I wouldn't use them without a good reason.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

macro conventions "Bill Cunningham" <nospam@nspam.invalid> - 2011-05-13 12:56 -0400
  Re: macro conventions pete <pfiland@mindspring.com> - 2011-05-13 13:08 -0400
  Re: macro conventions Shao Miller <sha0.miller@gmail.com> - 2011-05-13 13:14 -0400
    Re: macro conventions Keith Thompson <kst-u@mib.org> - 2011-05-13 11:41 -0700
      Re: macro conventions "Bill Cunningham" <nospam@nspam.invalid> - 2011-05-14 23:08 -0400
  Re: macro conventions ralph <nt_consulting64@yahoo.net> - 2011-05-13 13:15 -0500
    Re: macro conventions "Bill Cunningham" <nospam@nspam.invalid> - 2011-05-14 23:11 -0400
    Re: macro conventions "Bill Cunningham" <nospam@nspam.invalid> - 2011-05-15 04:00 -0400
      Re: macro conventions Angel <angel+news@spamcop.net> - 2011-05-15 11:15 +0000
        Re: macro conventions Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-05-16 04:36 +0300
          Re: macro conventions Ike Naar <ike@sverige.freeshell.org> - 2011-05-16 09:56 +0000
            Re: macro conventions Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-05-16 19:00 +0300
            Re: macro conventions Seebs <usenet-nospam@seebs.net> - 2011-05-16 19:10 +0000
              Re: macro conventions Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-05-22 21:27 +0300
    Re: macro conventions Keith Thompson <kst-u@mib.org> - 2011-05-15 06:50 -0700
      Re: macro conventions Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-05-15 08:29 -0700
        Re: macro conventions Ian Collins <ian-news@hotmail.com> - 2011-05-16 07:40 +1200
          Re: macro conventions "osmium" <r124c4u102@comcast.net> - 2011-05-15 14:52 -0500
      Re: macro conventions ralph <nt_consulting64@yahoo.net> - 2011-05-16 02:22 -0500
        Re: macro conventions Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-05-16 14:18 +0100
          Re: macro conventions David Resnick <lndresnick@gmail.com> - 2011-05-16 08:03 -0700
            Re: macro conventions Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-05-16 17:32 +0100
        Re: macro conventions Keith Thompson <kst-u@mib.org> - 2011-05-16 08:43 -0700
          Re: macro conventions Michael Press <rubrum@pacbell.net> - 2011-05-16 14:47 -0700

csiph-web