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


Groups > comp.lang.c > #12851

Re: A variation of #

From Ian Collins <ian-news@hotmail.com>
Newsgroups comp.lang.c
Subject Re: A variation of #
Date 2011-11-08 07:59 +1300
Message-ID <9hqo41F4bgU2@mid.individual.net> (permalink)
References <8f2cadb2-614d-4754-8bc3-bb7c063524ae@c16g2000pre.googlegroups.com>

Show all headers | View raw


On 11/ 8/11 07:53 AM, Andrey Vul wrote:
> To stringify pp-constants, we use #foo notation.
> Is there a method of charifying constants defined on the preprocessor
> level, assuming the precondition of length being 1 is true?
> That is, does there exist a pp-builtin CHARIFY such that CHARIFY(x) =
> 'x' ?

Something like

#define CHAR(x) #x [0]

?

-- 
Ian Collins

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


Thread

A variation of # Andrey Vul <andrey.vul@gmail.com> - 2011-11-07 10:53 -0800
  Re: A variation of # Ian Collins <ian-news@hotmail.com> - 2011-11-08 07:59 +1300
    Re: A variation of # Andrey Vul <andrey.vul@gmail.com> - 2011-11-07 11:11 -0800
      Re: A variation of # James Kuyper <jameskuyper@verizon.net> - 2011-11-07 15:07 -0500
        Re: A variation of # lawrence.jones@siemens.com - 2011-11-07 17:53 -0500
          Re: A variation of # James Kuyper <jameskuyper@verizon.net> - 2011-11-07 18:31 -0500
            Re: A variation of # lawrence.jones@siemens.com - 2011-11-08 09:16 -0500
          Re: A variation of # Thad Smith <ThadSmith@acm.org> - 2011-11-07 19:51 -0700
          Re: A variation of # Harald van Dijk <truedfx@gmail.com> - 2011-11-08 09:01 -0800
            Re: A variation of # James Kuyper <jameskuyper@verizon.net> - 2011-11-08 12:15 -0500
        Re: A variation of # Andrey Vul <andrey.vul@gmail.com> - 2011-11-07 17:32 -0800
          Re: A variation of # James Kuyper <jameskuyper@verizon.net> - 2011-11-07 21:17 -0500
    Re: A variation of # Andrey Vul <andrey.vul@gmail.com> - 2011-11-07 11:08 -0800
  Re: A variation of # Peter Nilsson <airia@acay.com.au> - 2011-11-07 16:46 -0800

csiph-web