Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: defining a comment?
Message-ID: <1988Sep14.153648.19047@utzoo.uucp>
Organization: U of Toronto Zoology
References: <5438@techunix.BITNET>
Date: Wed, 14 Sep 88 15:36:48 GMT

In article <5438@techunix.BITNET> benny%techunix.bitnet@jade.berkeley.edu (Benny Pinkas) writes:
>Can I use the Preprocessor to define a comment?

Well, maybe.  The draft standard unambiguously says "no":  comments are
scanned and deleted before preprocessing is done.  However, many existing
implementations do things differently.  The preprocessor semantics were
never very well specified.  Given that most implementations will comply
with, or at least move towards, ANSI compliance eventually, you should
not rely on it.

>#define COM /*this is a comment*/

This ends up defining COM to be white space, which is legitimate.

>#define STARTCOM /*

This isn't going to work.
-- 
NASA is into artificial        |     Henry Spencer at U of Toronto Zoology
stupidity.  - Jerry Pournelle  | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
