home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
ipo-101.zip
/
Samples.zip
/
TYPE2.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1997-09-06
|
837b
|
33 lines
(**************************************************************************
** This program copies characters from the input file to the standard output
**
** Syntax: ivm type2 in
** where 'in' is the name of the input file.
*)
program type2(output);
var
f : text;
c : char;
begin
if paramcount <> 1 then
begin
writeln('Types the contents of the input file to the standard output');
writeln('Syntax: ivm type2 in');
writeln('where ''in'' is the input file');
halt
end;
assign(f, paramstr(1));
reset(f); (* Open 'in' *)
while not eof(f) do
if eoln(f) then
begin
readln(f);
writeln
end
else
begin
read(f, c);
write(c)
end
end.