Kaz Kylheku <firstname.lastname@example.org> wrote:
| Pascal Costanza <email@example.com> wrote:
| > Hm, the following seems to go into an endless loop in two Lisp
| > implementations I checked:
| > (loop finally (print 'screw-you))
| > Is this according to the spec?
| It's not a simple loop form ... So this is an extended loop with a FINALLY
| clause that is never reached, since there is no termination test, nor any
| explicit LOOP-FINISH or RETURN.
| 126.96.36.199 Order of Execution says: ``Execution is repeated until a clause
| terminates the loop or until a return, go or throw form is encountered
| which transfers control to a point outside the loop.''
CMUCL, for one, seems to agree:
'(loop finally (print 'screw-you)))
(BLOCK NIL (ANSI-LOOP::LOOP-BODY NIL NIL NIL NIL ((PRINT 'SCREW-YOU))))
'(ANSI-LOOP::LOOP-BODY NIL NIL NIL NIL ((PRINT 'SCREW-YOU)))
Rob Warnock <firstname.lastname@example.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607