From: John L. Stein
Subject: How can I declare a local variable ?
Date: 
Message-ID: <57jb9r$tfu@uni.library.ucla.edu>
I need to declare a local variable of type "vertex"
so that I can (set! vert jkl)

Thanks
-js

From: Raffael Cavallaro
Subject: Re: How can I declare a local variable ?
Date: 
Message-ID: <raffael-2911960039530001@macav.tiac.net>
In article <··········@uni.library.ucla.edu>, "John L. Stein"
<·····@seas.ucla.edu> wrote:

> I need to declare a local variable of type "vertex"
> so that I can (set! vert jkl)
> 
> Thanks
> -js


(defun a-function (arg-0)
  (let ( (foo <some appropriate vertex value>) ) 
   (declare (vertex foo))
       <body of function>))


in other words, #'let allows you to include a declaration form within the
let form. It must appear at the beginning of the let form (right after the
list of variable - value pairs).

Is this what you're asking?

Raf
From: Vassili Bykov
Subject: Re: How can I declare a local variable ?
Date: 
Message-ID: <m3d8wu7s4w.fsf@wintermute.hip.cam.org>
In article <························@macav.tiac.net> 
·······@tiac.net (Raffael Cavallaro) writes:

   (defun a-function (arg-0)
     (let ( (foo <some appropriate vertex value>) ) 
      (declare (vertex foo))
	  <body of function>))

Of course, that `declare' should be

  (declare (type vertex foo))
            ^^^^
Abbreviating

  (TYPE type var1 var2 ...)

as simply

  (type var1 var2 ...) 

is allowed *only* for a number of predefined types.

--Vassili
From: Howard R. Stearns
Subject: Re: How can I declare a local variable ?
Date: 
Message-ID: <32A2F1E5.4487EB71@elwoodcorp.com>
Vassili Bykov wrote:
> 
> In article <························@macav.tiac.net>
> ·······@tiac.net (Raffael Cavallaro) writes:
> 
>    (defun a-function (arg-0)
>      (let ( (foo <some appropriate vertex value>) )
>       (declare (vertex foo))
>           <body of function>))
> 
> Of course, that `declare' should be
> 
>   (declare (type vertex foo))
>             ^^^^
> Abbreviating
> 
>   (TYPE type var1 var2 ...)
> 
> as simply
> 
>   (type var1 var2 ...)
> 
> is allowed *only* for a number of predefined types.
> 
> --Vassili

Actually, the abbreviation is allowed for both implementation and user
defined types in ANSI. See:
 
http://www.harlequin.com/books/HyperSpec/Body/dec_type.html
http://www.harlequin.com/books/HyperSpec/Issues/iss350-writeup.html