[comp.lang.c] What is Literate Programming?

cotner@brahms.berkeley.edu (Carl Cotner) (01/12/90)

Does anyone have any information about Donald Knuth's Literate 
Programming concept.  Is this explained in his books, The Art of 
Computer Programming?  I'm only aware of Knuth through TeX.  I
believe that TeX is stored in a web file, which combines source code
with documentation, in accordance with his belief that the 2 should be 
closely integrated.

I'm very interested in this.  I would look into web, only I believe that
web will extract a Pascal file.  I'm more interested in working on a
C based project.  Is there a C version of WEB?

If someone can enlighten me by providing me with more details on web,
on Literate Programming, and on how I can accomplish my tasks in C,
I'd be grateful.

Thanks

Carl
cotner@brahms.Berkeley.EDU

ucbvax!brahms!cotner	           Carl Cotner/UCB Math Dept/Berkeley CA 94720

reino@cs.eur.nl (Reino de Boer) (01/16/90)

cotner@brahms.berkeley.edu (Carl Cotner) writes:

>Does anyone have any information about Donald Knuth's Literate 
>Programming concept.  Is this explained in his books, The Art of 
>Computer Programming?  I'm only aware of Knuth through TeX. [...]

``The WEB system of structured documentation'' by Donald E. Knuth,
Stanford Computer Science Report 980 (Stanford, California, September,
1983), 206 pp. A ten-page user manual for WEB, followed by complete
programs for WEB in its own language.

``Literate programming'' by Donald E. Knuth, The Computer Journal 27
(1984), 97--111. An expository introduction to WEB and its underlying
philosophy.

>I'm very interested in this.  I would look into web, only I believe that
>web will extract a Pascal file.  I'm more interested in working on a
>C based project.  Is there a C version of WEB?

Yes, there is, and it is distributed along with TeX for UNIX systems (as
far as I'm aware). The relevant programs are called Cweave and Ctangle.

>Thanks

You're welcome -- Reino

-- 
Reino R. A. de Boer
Erasmus University Rotterdam ( Informatica )
e-mail: reino@cs.eur.nl