[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
loop bug
A never saw a reply on this (from dec 11).
Example from CLtL2 page 742.
(loop for item in '(1 2 3 a 4 5)
when (not (numpberp item))
return (cerror "Enter new value"
"Non-numeric value ~S"
item))
CMU Common Lisp 25-Sep-1991, running on panther
Hemlock 3.5 (25-Sep-1991), Python 1.0(25-Sep-1991), target SPARCstation/Mach 0.\0
Send bug reports and questions to cmucl-bugs@cs.cmu.edu.
* (loop for item in '(1 2 3 a 4 5)
when (not (numberp item))
return (cerror "enter new value"
"non numeric value ~S"
item))
Error in function LOOP::PARSE-AND-CLAUSES.
Invalid clause for inside a conditional: RETURN
Restarts:
0: Return to Top-Level.
Debug (type H for help)
(DEBUG::DEBUG-LOOP)
0] ba
(DEBUG::DEBUG-LOOP)
(DEBUG:INTERNAL-DEBUG)
(INVOKE-DEBUGGER #<SIMPLE-ERROR.71F4C45>)
(ERROR "Invalid clause for inside a conditional: ~S" RETURN)
(LOOP::PARSE-AND-CLAUSES)
(LOOP::PARSE-CONDITIONAL (NOT (NUMBERP ITEM)))
(LOOP::MAYBE-PARSE-CONDITIONAL)
(LOOP::PARSE-LOOP (FOR ITEM IN '(1 2 3 A 4 ...) WHEN ...))
(MACROEXPAND-1 (LOOP FOR ITEM IN '# WHEN # # RETURN #) NIL)
(MACROEXPAND #<unavailable-arg> NIL)
(EVAL (LOOP FOR ITEM IN '# WHEN # # RETURN #))
(INTERACTIVE-EVAL (LOOP FOR ITEM IN '# WHEN # # RETURN #))
(LISP::%TOP-LEVEL)
(LISP::%INITIAL-FUNCTION)
0]
This construct is used heavily in gina that in am trying to port.
David Axmark
EMAIL: davida@isil.detron.se or davida@emil.csd.uu.se
MAIL: Detron HB, Petterslundsg 11 A, 753 28, UPPSALA, SWEDEN
PHONE: + (46) 18 - 11 07 80
(I can't spell in ANY language ...)
- Follow-Ups:
- Re: loop bug
- From: Miles Bader <miles@cogsci.edinburgh.ac.uk>