Article View: comp.std.c
Article #2434Preprocessor question
From: Ari Juhani Huttunen
Date: Sat, 16 Feb 1991 22:05
Date: Sat, 16 Feb 1991 22:05
18 lines
1307 bytes
1307 bytes
I would like to do the following or something similar:
#define BLOCK_SIZE 1024
char *message = "The block size is " # BLOCK_SIZE " bytes.";
I need the result: "The block size is 1024 bytes."
I know what I am doing wrong, but HOW should I do it? These alternatives
are no good:
- #define BLOCK_SIZE_STRING "1024"
- char *message = "The block size is 1024 bytes.";
--
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
I I__I I__I I__I I__I I__I I__I I__I I__I I__I I__I I__I I__I I__I I__I I__I I_
Ari Huttunen A computer is like a house of cards. Not as reliable,
but it has an equal number of incompatible parts.
_______________________________________________________________________________
Technical Details
Message-ID:
<AHUTTUNE.91Feb16230548@silver-surfer.hut.fi>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!uakari.primate.wisc.edu!caen!uwm.edu!rpi!uupsi!sunic!news.funet.fi!funic!santra!santra!ahuttuneShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!uakari.primate.wisc.edu!caen!uwm.edu!rpi!uupsi!sunic!news.funet.fi!funic!santra!santra!ahuttune From: ahuttune@niksula.hut.fi (Ari Juhani Huttunen) Newsgroups: comp.std.c Subject: Preprocessor question Message-ID: <AHUTTUNE.91Feb16230548@silver-surfer.hut.fi> Date: 16 Feb 91 22:05:48 GMT Sender: news@santra.uucp (Cnews - USENET news system) Distribution: comp Organization: Helsinki University of Technology, Finland Lines: 18