home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
progpas
/
tspas18.arj
/
TSUNTF.TST
< prev
next >
Wrap
Text File
|
1989-12-02
|
1KB
|
57 lines
(* This is a test program for the TSUNTF.TPU unit
All rights reserved 19-Aug-89
Updated 23-Sep-89
*)
uses Dos,
Crt,
TSUNTF;
procedure LOGO;
begin
writeln;
writeln ('TSUNTF unit test by Prof. Timo Salmi, 4-Sep-89');
writeln ('University of Vaasa, Finland, ts@chyde.uwasa.fi');
writeln;
writeln ('....:....1....:....2....:....3....:....4....:....5....:....6....:....7....:....');
end; (* logo *)
(* Input line-editing *)
procedure TEST1;
var sj : string;
prompt : string;
tmp : string;
begin
prompt := 'Give your input> ';
FillChar (tmp, SizeOf(tmp), '.'); { If you are wondering about these two, }
tmp[0] := chr(Length(prompt)); { they just produce points to show where}
repeat { we are. }
EDRDLN (prompt, sj);
writeln (tmp, sj);
until sj = 'exit';
end; (* test1 *)
(* Iput line-editing with recall potential *)
procedure TEST2;
var sj : string;
old : string;
prompt : string;
tmp : string;
begin
prompt := 'Give your input> ';
old := '';
repeat
EDREADLN (prompt, old, sj);
writeln (sj);
old := sj;
until sj = 'exit';
end; (* test2 *)
(* Main program *)
begin
ClrScr;
LOGO;
{ TEST1; }
TEST2;
end. (* tsuntf.tst *)