Next: Question 23
Prev: Question 21
Up: Common Things People Want To Know
Top: Top
[22] Inserting meta-comments in FWEB files?
Johannes Muller reported strange output from fweave
when defining two macros debug and gubed
to enclose optional code for debugging purposes.
As his global language, he chose C++.
@m debug @(
@m gubed @)
@f debug do
@f gubed while
This worked fine for him using WEB with Pascal.
`@(' and `@)' are control codes which mark
the begin and end of a meta-comment, i.e. commented
out code that will appear in the output file [M-11.38].
Though I wasn't able to reproduce his errors, it should be
remarked that the preferred way is to use the WEB preprocessor
construction `@#if(0) ... @#endif' instead.
JAK: ``That Muller's example doesn't work probably points out
a problem with the macro preprocessor''.
For debugging purposes, one can bracket pieces of code by
`@#ifdef DEBUG ... @#endif', switching on DEBUG
by the commandline flag `-mDEBUG' for ftangle [M-7.5].
Archive-Date: Thu, 01 Oct 1992 07:49:37 CDT