Our version of Franz Lisp (Opus 38.92, Encore Version 2.2) doesn't seem to handle recursion nearly as well as it should. (I know, iteration where poss-
possible but there are problems of small size that this thing bombs on.)
Programs that I wrote and ran a few years back now crash. The following program
grinds to a halt after printing just 1000 value (approx) from a starting value
of 1.
(defun recurse(x)
(print x) (terpri) (recurse (add1 x)))
If anyone could offer a suggestion as to what is wrong, please
respond. (I suspect somebody went around re-compiling things on this system
with that buggy global optimizer on. . . .)
================================================================================
Donald A. Bachman| >>>> The Eternal Senior <<<<
================================================================================
From: Brian Parent
Subject: Re: Help, Strange Lack of Memory
Date:
Message-ID: <24959@sdcc6.ucsd.edu>
In article <······················@uokmax.ecn.uoknor.edu> ········@uokmax.ecn.uoknor.edu (Donald A Bachman) writes:
> (defun recurse(x)
> (print x) (terpri) (recurse (add1 x)))
>
You don't have a base case. That is, there is no value of x for
which this recursion will terminate.
Steve Boswell | "Oh wow... good nyborg!"
······@ucsd.edu | -Heavy Metal
······@gnu.ai.mit.edu |