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
/
idepth.icn
< prev
next >
Wrap
Text File
|
2001-05-02
|
799b
|
39 lines
############################################################################
#
# File: idepth.icn
#
# Subject: Program to report maximum recursion depth
#
# Author: Ralph E. Griswold
#
# Date: May 2, 2001
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This program processes trace output and reports the maximum depth of
# recursion.
#
############################################################################
procedure main()
local i, max
max := 0
every !&input ? {
tab(upto('(')) ? {
i := 0
every find("| ") do
i +:= 1
max <:= i
}
}
write(max)
end