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
/
gprocs
/
fetchpat.icn
< prev
next >
Wrap
Text File
|
2000-07-29
|
1KB
|
46 lines
############################################################################
#
# File: fetchpat.icn
#
# Subject: Procedure to fetch a pattern specification
#
# Author: Ralph E. Griswold
#
# Date: October 21, 1993
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This procedure fetches a pattern by number from a file of pattern
# specifications. It fails if the file does not exist or does not
# contain that many pattern specifications.
#
# The file is searched for in the current directory first, then using
# DPATH.
#
############################################################################
#
# Links: io, patutils
#
############################################################################
link io
link patutils
procedure fetchpat(file, n)
local input, pattern
input := dopen(file) | fail
every 1 to n do
pattern := readpatt(input)
close(file)
return \pattern
end