Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Illustrative, unused code in CWEB

4 views
Skip to first unread message

Allan Adler

unread,
Jul 20, 2006, 10:42:10 PM7/20/06
to

Suppose you want to write a literate program in CWEB. You might want
to explain why you didn't do something a certain way. In order to
articulate what you chose not to do, you might want to display the
code you didn't use. Understandably, you might want what you didn't
do to be presented as clearly as what you did do, so you might want
to be able to format what you didn't do the same way you format the
code that actually goes into the program. In particular, it should look
the same, more or less, when you print out the TeX file.

I could be mistaken, but I don't think that CWEB supports documenting
what isn't in the program; it only supports documenting what you did
put in the program.

Is there any version of web that does support the practice of documenting
discarded code?
--
Ignorantly,
Allan Adler <a...@zurich.csail.mit.edu>
* Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
* comments do not reflect in any way on MIT. Also, I am nowhere near Boston.

Patrick TJ McPhee

unread,
Jul 21, 2006, 12:29:50 AM7/21/06
to
In article <4iat82F...@uni-berlin.de>,
Allan Adler <a...@nestle.csail.mit.edu> wrote:

% I could be mistaken, but I don't think that CWEB supports documenting
% what isn't in the program; it only supports documenting what you did
% put in the program.

You can create chunks which you don't include in the final program.
cweave will warn you about them, but ctangle won't care.
--

Patrick TJ McPhee
North York Canada
pt...@interlog.com

Joe Riel

unread,
Jul 21, 2006, 1:10:54 AM7/21/06
to
Allan Adler <a...@nestle.csail.mit.edu> writes:

> Is there any version of web that does support the practice of documenting
> discarded code?

I'm only familar with noweb. The way to do it there is to put the
code in a chunk that isn't included in the generated code. For
example

<<*>>=
...
@


<<unused code>>=
...
@

--
Joe Riel

0 new messages