🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2043

Re: Macro substitution in character literals

#2043
From: Sean Eric Fagan
Date: Sat, 08 Dec 1990 01:42
15 lines
1113 bytes
In article <14683@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes:
>If you're desperate, you might try
>	#define chr(c) #c[0]

Microsoft C 6.0 has a #@ construct, which is like stringizing, only it
yields a character instead of a string.

I know, it's not standard, but it is upwardly compatable with the standard,
and they might try to press for it for the next version of the standard.

-- 
Sean Eric Fagan  | "I made the universe, but please don't blame me for it;
sef@kithrup.COM  |  I had a bellyache at the time."
-----------------+           -- The Turtle (Stephen King, _It_)
Any opinions expressed are my own, and generally unpopular with others.
Technical Details
Message-ID: <1990Dec08.014241.435@kithrup.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!csun!kithrup!sef
References: <11323@pt.cs.cmu.edu> <14683@smoke.brl.mil>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!csun!kithrup!sef
From: sef@kithrup.COM (Sean Eric Fagan)
Newsgroups: comp.std.c
Subject: Re: Macro substitution in character literals
Keywords: Macro substitution, C preprocessor
Message-ID: <1990Dec08.014241.435@kithrup.COM>
Date: 8 Dec 90 01:42:41 GMT
References: <11323@pt.cs.cmu.edu> <14683@smoke.brl.mil>
Organization: Kithrup Enterprises, Ltd.
Lines: 15