Re: strange behaviour in loop

Luke Tierney <[email protected]> Wed, 24 Apr 2002 12:36:34 -0500
Newsgroups gmane.lisp.statistics
Message-ID <[email protected]>
If you byte compile it you get an error message because it uses the
macro definition of loop.  It might make sense to drop the internal
version and just use the macro--might be worth some timings so be
sure.

luke

On Wed, Apr 24, 2002 at 03:58:38PM +0200, Frederic Udina wrote:
> 
> Hi,
> 
> I observed that loop has a strange behaviour:
> 
> > (setq ii 0)
> 0
> > (loop foo foo  (incf ii) foo (when (> ii 10000) (return)))
> NIL
> 
> doesnt give any error despite foo isn't bound to anything
> 
> > foo
> Error: The variable FOO is unbound.
> 
> Why is that? Is it a bug or is something I do not know about loop?
> 
> 
> 
>  Frederic Udina
>   ____________________________________________________________________
>   <[email protected]> Dept. D'Economia i Empresa   Universitat Pompeu Fabra
>                   Ramon Trias Fargas, 25-27      08005 Barcelona SPAIN
>   tel. 34- 935421756/1763 fax: 34- 935421746     http://libiya.upf.es/
>   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   There are many here among us who feel that life is but a joke  B.Dy.
> 
> 

-- 
Luke Tierney
University of Minnesota                      Phone:           612-625-7843
School of Statistics                         Fax:             612-624-8868
313 Ford Hall, 224 Church St. S.E.           email:      [email protected]
Minneapolis, MN 55455 USA                    WWW:  http://www.stat.umn.edu