blob: 5096c1a55d955fa0aabfbda12fd53e45a05822ac (
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
|
\openin\inp=animal.dat
\ifeof\inp \errmessage{Unable to open animal.dat!}\fi
\loop
\temp=\curcode
\Scan
\Query
\mainlreptrue
\ifnum\curcode=0
\immediate\write16{%
Thank you for using Animals. I'm glad I got it right.}
\mainlrepfalse
\else
\ifnum\curcode=-1 \NewAnimal\mainlrepfalse\fi
\fi
\ifmainlrep
\repeat
\closein\inp
\message{Wanna go again? }%
\GetYN
\ifyn
\curcode=1 % initialization
\else
\def\maybecontinue{}%
\fi
\endinput
|