NetBSD/share/doc/ps1/04.pascal/kat2.p

24 lines
374 B
OpenEdge ABL

program kat(input, output);
var
ch: char;
i: integer;
name: packed array [1..100] of char;
begin
i := 1;
repeat
if i < argc then begin
argv(i, name);
reset(input, name);
i := i + 1
end;
while not eof do begin
while not eoln do begin
read(ch);
write(ch)
end;
readln;
writeln
end
until i >= argc
end { kat }.