C's Limited Macro Capabilities

Henry Spencer henry at utzoo.uucp
Mon Dec 4 16:47:12 AEST 1989


In article <69517 at psuecl.bitnet> bpm at psuecl.bitnet (Brian Moquin) writes:
>A student in my C class asked me an interesting question:  can you have
>conditional compilation directives embedded within '#define' macros?
>The answer is no.  The student pointed out that this then
>severely limits the macro capabilities of C...

He is correct.  C is not intended to be the answer to all the world's
problems.  In particular, the C preprocessor is not intended to be an
all-singing-all-dancing Turing-capable macro language.  As Dennis put
it:  "If you want PL/I, you know where to find it."
-- 
Mars can wait:  we've barely   |     Henry Spencer at U of Toronto Zoology
started exploring the Moon.    | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list