TENAGLIA@mis.mcw.edu (Chris Tenaglia - 257-8765) (11/26/90)
Icon is a pretty nifty programming language. I like and use the 'initial'
construct. But sometimes I wished I had a 'final' construct. This may be
a crummy example, but it illustrates the concept of the final pass through
a procedure. Perhaps this isn't even implementable? Any comments on it's
usefullness or implementation problems?
procedure print(fo,line)
static ff, pageno, line_count
initial
{
ff := ""
pageno := 0
line_count := 0
}
if (line_count -:= 1) < 0 then
{
write(fo,ff,"title line ",(pageno +:= 1))
line_count := 55
ff := "\f"
}
write(fo,format(line))
final
{
output_summary()
}
end
Chris Tenaglia (System Manager) | Medical College of Wisconsin
8701 W. Watertown Plank Rd. | Milwaukee, WI 53226
(414)257-8765 | tenaglia@mis.mcw.edu, mcwmis!tenaglia