scope of a declare

Can anyone find any evidence in the hyperspec that the (declare (fixnum a)) refers to the inner binding of a or to both bindings? It seems the safe thing to do is assume it only refers to the inner one.

Sent via Deja.com http://www.*-*-*.com/ Before you buy.

Sun, 19 May 2002 03:00:00 GMT

Rob Warno#2 / 2

scope of a declare

+--------------- | (defun foo (x y z) | (declare (fixnum x y z)) | (let* ((a (+ x y)) | (a (- a z))) | (declare (fixnum a)) | a)) | | Can anyone find any evidence in the hyperspec that the | (declare (fixnum a)) refers to the inner binding of a or | to both bindings? It seems the safe thing to do is assume | it only refers to the inner one. +---------------

Section 3.3.4 "Declaration Scope" says:

The scope of a bound declaration is the same as the lexical scope of the binding to which it applies...

[also see the def'n of "bound declaration"], so I'd assume it does.

But in any practical case where I was worried about it I'd just hand-expand the "let*" and moot the issue: ;-} ;-}