Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!gatech!newsfeed.internetmci.com!howland.reston.ans.net!plug.news.pipex.net!pipex!nielsen.co.uk!peer-news.britain.eu.net!newsfeed.ed.ac.uk!edcogsci!jeff
From: jeff@cogsci.ed.ac.uk (Jeff Dalton)
Subject: Re: Loop construct
Message-ID: <DLnG5K.Gxz.0.macbeth@cogsci.ed.ac.uk>
Organization: Centre for Cognitive Science, Edinburgh, UK
References: <30FFB947.3B7C@ling.umu.se> <3101A5C3.35B2AFD3@nando.net> <3104FAD8.6E96@ling.umu.se>
Date: Tue, 23 Jan 1996 19:44:08 GMT
Lines: 34

In article <3104FAD8.6E96@ling.umu.se> Ola Andersson <rand@ling.umu.se> writes:
>Raymond Toy wrote:
>Thanks Ray and everyone else who has help me! I got the Symbolics loop macro
>from the CMU lisp archives but when I use this construct:
>(loop for i from 1 below 11
>      do
>      (print i)
>      )
>for example I get this warning:
>Warning: The form 1 evaluated to 1, which was not of the anticipated type ANSI-LOOP::REAL.
>         Current LOOP context: FOR I FROM 1 BELOW 11 DO.
>Warning: The form 11 evaluated to 11, which was not of the anticipated type ANSI-LOOP::REAL.
>         Current LOOP context: FOR I FROM 1 BELOW 11 DO.
>
>It's just a warning but it slows down my program, so how do I get around it?

GCL 1.1 needs two things added to the MIT LOOP.

Add this, after the in-package lines:

#+kcl
(progn
  ;; /\/: Still a little old-fashioned ... [jd 11 Jan 96]
  (defmacro special-operator-p (x) `(special-form-p ,x))
  (deftype real () '(or rational float))
)

Or get:

 http://www.aiai.ed.ac.uk/~jeff/local-ftp/pub/home/jeff/loop.lsp

-- jd


