blob: 36ea279ffc42df1a6a6e17cf6ffb9d80d5248f59 (
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
|
PACKET dynamo printer DEFINES initialize print, new line, print :
BOOL VAR prt;
TEXT VAR headline;
REAL VAR prtper, nextprint;
PROC initialize print (TEXT CONST h) :
headline := h;
prtper := get prtper;
nextprint := 0.0
END PROC initialize print;
PROC new line (REAL CONST time) :
IF time >= nextprint
THEN do lf
ELSE prt := FALSE
FI;
WHILE time >= nextprint REP
nextprint INCR prtper
PER.
do lf :
print line;
prt := TRUE;
IF pagefeed necessary OR NOT was print
THEN vdt;
sys page;
print headline
FI;
print (time).
print headline :
println ("TIME " + headline).
END PROC new line;
PROC print (REAL CONST r) :
IF prt
THEN print output (text (text (round (r, 5)), 13))
FI
END PROC print
END PACKET dynamo printer
|