blob: bd26d89b7131b7c2c704a86fb3ba3ffdb6e3a9aa (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
\input cap
A short program in C. It was inserted directly into the \TeX\ source file.
\medskip
\BeginC
#include <stdio.h>
void main()
{
a=~a;
printf("Hello, world!\n");
// printf("Hello, world!\n");
}
\EndC
\hrule
\bigskip
And now a program inserted from a separate file.
\medskip
\InputC{prog/sun.c}
\vfill\eject
And now programs written in Pascal. This one was typed directly into this
file.
\medskip
\BeginPascal
program Hello_world;
begin
writeln('Hello, world!');
{ writeln('Hello, world!'); }
end.
\EndPascal
\hrule
\bigskip
This one was imported from another file.
\medskip
\InputPascal{prog/guess.pas}
\bye
|