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
/
former.icn
< prev
next >
Wrap
Text File
|
2000-07-29
|
867b
|
34 lines
############################################################################
#
# File: former.icn
#
# Subject: Program to format long string in fixed-length lines
#
# Author: Ralph E. Griswold
#
# Date: June 10, 1995
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This program takes a single line of input and outputs in in lines
# no greater than the number given on the command line (default 80).
#
############################################################################
procedure main(args)
local limit, line
limit := integer(args[1]) | 80
line := read() | stop("*** no input line")
line ? {
while write(move(limit))
if not pos(0) then write(tab(0))
}
end