The <<name>> marker can be associated with many different code chunks. This is particularly useful when the code is described in a top down fashion. For example, in Figure 7 we see the mixing of document chunks with code chunks using this feature. The compiler sees the same input regardless.
Table 7: A Bit More Complex noweb File
Notice that ``stdio.h'' is in a different font from the rest of the words in the comments. This is accomplished by writing ``double-brackets'' around stdio.h as [ [ stdio.h ] ]. This allows us to use fonts to draw attention to program names and expressions in the documentation. This is similar to the rules used to typeset mathematics.
The last feature to describe is how to use the definitions. Figure 8 shows a much rearranged version of Figure 7. Now we have given the two code chunks distinct names, neither of which is *. To get the output to the compiler, we invented a new code chunk for the * and put the names of the code chunks in their proper order.
These simple procedures are all one needs to know to make effective use of a simple LPS.
Table 8: An Even More Complex noweb File