Path: utzoo!attcan!uunet!seismo!ukma!mailrus!ames!uhccux!munnari.oz.au!cs.mu.oz.au!ok From: ok@cs.mu.oz.au (Richard O'Keefe) Newsgroups: comp.unix.wizards Subject: Re: Need help using /usr/lib/cpp for generic text Message-ID: <2164@munnari.oz.au> Date: 22 Sep 89 10:35:43 GMT References: <838@pacific.mps.ohio-state.edu> <3323@solo10.cs.vu.nl> Sender: news@cs.mu.oz.au Lines: 25 In article <3323@solo10.cs.vu.nl>, maart@cs.vu.nl (Maarten Litmaath) writes: > One limitation: you shouldn't use `/*' and `*/' to comment out text; instead > use: > #if 0 > ... > #endif 0 This advice was correct in the specific context (using cpp for generic text on a particular operating system). However, it is not correct for C. #endif 0 (a) ^ this token is not legal in dpANS C; V.3 tends not to like it (b) You should not use this technique to comment out text in a C program; new C compilers are allowed to complain about mismatched quotes when they see "don't" and other such text, and some _do_. You're going to laugh, but how about using the Bourne shell as a condition processing facility? E.g. if [ ... ] ; then cat <<'EndOfPart' any old text -- almost EndOfPart else # equivalent of 'include' cat foo.inc fi