home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
historic
/
v941.tgz
/
icon.v941src.tar
/
icon.v941src
/
ipl
/
progs
/
vrepl.icn
< prev
next >
Wrap
Text File
|
2000-07-29
|
821b
|
33 lines
############################################################################
#
# File: vrepl.icn
#
# Subject: Program to replicate input lines
#
# Author: Ralph E. Griswold
#
# Date: January 14, 1999
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This program replicates every line of standard input a specified
# number of times and writes the result to standard output. The
# replication factor is given on the command line.
#
############################################################################
procedure main(args)
local i, line
i := integer(args[1]) | 1
while line := read() do
every 1 to i do
write(line)
end