Skip to content
Snippets Groups Projects
Commit 95b82936 authored by toy's avatar toy
Browse files

LOOP accepts NIL as the variable if arithmetic loops, such as

    (loop for nil from 0 to 5 do (print "x"))
parent fc4e2aca
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
#+cmu #+cmu
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/loop.lisp,v 1.23 2003/08/28 14:14:57 gerd Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/loop.lisp,v 1.24 2004/01/18 13:47:55 toy Exp $")
;;;; LOOP Iteration Macro ;;;; LOOP Iteration Macro
...@@ -1582,7 +1582,7 @@ collected result will be returned as the value of the LOOP." ...@@ -1582,7 +1582,7 @@ collected result will be returned as the value of the LOOP."
;FOR variable keyword ..args.. ;FOR variable keyword ..args..
(defun loop-do-for () (defun loop-do-for ()
(let* ((var (loop-pop-source)) (let* ((var (or (loop-pop-source) (loop-gentemp 'loop-do-for-anon-)))
(data-type (loop-optional-type var)) (data-type (loop-optional-type var))
(keyword (loop-pop-source)) (keyword (loop-pop-source))
(first-arg nil) (first-arg nil)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment