summaryrefslogtreecommitdiff
path: root/web/knit/demo.web
blob: d5096b6df76a308151d3e0be13a67ef08ad78f1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
% This is demo.web
@* Demo. This is just a short example to demonstrate the KNIT and TWIST
program.
@p
program demo(input,output);
begin
   @<Write some output@>
   @<And some more@>
   @<And more lines@>
end.

@ This is the second module.
@<Write some output@>==
   writeln('I am line1');
   writeln('I am line2');
   writeln('I am line3');

@ This is the third module.
@<And some more@>=
   writeln('I am line4');
   writeln('I am line5');
   writeln('I am line6');
   writeln('I am line7');
   writeln('I am line8');

@ And this the last one.
@<And more lines@>=
   writeln('I am line9');
   writeln('I am line10');
   writeln('I am line11');
   writeln('I am line12');