home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
progpas
/
tspas18.arj
/
TSUNTG.TST
< prev
next >
Wrap
Text File
|
1990-02-25
|
2KB
|
89 lines
{$M 16384,0,655360}
(* This is a test program for the TSUNTG.TPU unit
Updated 26-Nov-89, 6-Dec-89 *)
uses TSUNTG;
procedure LOGO;
begin
writeln;
writeln ('TSUNTG unit test by Prof. Timo Salmi');
writeln ('University of Vaasa, Finland, ts@chyde.uwasa.fi');
writeln;
end;
(* Number of diskette drives *)
procedure TEST1;
begin
writeln ('Number of diskette drives on this system is ', DRIVESFN);
end; (* test1 *)
(* Number of diskette drives *)
procedure TEST2;
begin
writeln ('The first diskette drive is ', FDRIVEFN);
end; (* test2 *)
(* Is a media present in the drive *)
procedure TEST3;
const drive = 'B';
begin
If INDRIVFN (drive) then
writeln ('Disk present in drive ', drive)
else
writeln ('Disk not present in drive ', drive);
end; (* test3 *)
(* Cursor location test *)
procedure TEST4;
var x , y : byte;
begin
GOATXY (10, 20);
write ('▓The block is at 10,20 .');
x := WHEREXFN - 1; y := WHEREYFN;
write (' and the point at ', x:0, ',', y:0);
end; (* test4 *)
(* Reverse the colors of an area *)
procedure TEST5;
begin
REVAREA (2, 2, 79, 24);
GOATXY (1, 22);
end; (* test5 *)
(* Redirection of writes *)
procedure TEST6;
begin
USEPRN;
writeln ('This goes to the printer');
writeln ('As does this');
USECON;
write ('This goes on the screen');
end; (* test6 *)
(* Test of the timed inkey function *)
procedure TEST7;
var key : char;
timeout : boolean;
begin
repeat
key := INKEYFN (3.0, timeout);
if not timeout then write (key)
else begin writeln; writeln ('Timeout',#7); end;
until key = #27;
end; (* test7 *)
(* Main program
If you just want a particular test, comment the others away *)
begin
LOGO;
TEST1;
TEST2;
TEST3;
TEST4;
TEST5;
TEST6;
{Put TEST7 here if you want to try it out}
end. (* tsuntg.tst *)