Program TSTEOF; {[A+,B+,K+,L-,R+]Pasmat Directive} { File:[22,311]TSTEOF.PAS Author:Jim Bostwick 11-OCT-83 History: } { Demonstrating an odd property of the Pascal-3 lazy-io facility. The following program looks pretty wierd (checking for eof before you enter anything. However, it works as written. Not only that, it has the neat property that, if you respond ^Z, you get the EOF message, not some crap about 'illegal value for integer' as with other Pascal versions. Even so, this style is going to take some getting used to..... } VAR i:integer; BEGIN repeat write('hi there, enter a number:'); if eof then writeln('be that way') else BEGIN readln(i); writeln(i,'-- congratulations.') END; until eof end.