home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
PASCAL
/
TSPA2555.ZIP
/
TSERR.TST
< prev
next >
Wrap
Text File
|
1991-01-05
|
916b
|
51 lines
{$R+} (* Index range check on *)
(* This is a test program for the TSERR.TPU unit
5-Jan-91 *)
uses TSERR;
procedure LOGO;
begin
writeln;
writeln ('TSUNTD unit test by Prof. Timo Salmi');
writeln ('University of Vaasa, Finland, ts@chyde.uwasa.fi');
writeln;
end;
procedure TEST1;
var s : string[79];
i : byte;
begin
i := 80;
s[i] := ' ';
end; (* test1 *)
procedure TEST2;
var x : real;
begin
x := 7.0; writeln (1.0/x);
x := 0.0; writeln (1.0/x);
x := 7.0; writeln (4.0/x);
end; (* test2 *)
procedure TEST3;
var f : file;
begin
assign (f, 'c:\NosuchF.ile');
reset (f);
close (f);
end; (* test3 *)
(* Main program *)
begin
LOGO;
TEST1;
{}
TEST2; { Because test1 results in an error you have to omit it, }
{ if you want test2, and so on }
{}
TEST3;
write ('Press «═╝ '); readln;
end. (* tsuntd.tst *)