|
From: Douglas K. <do...@go...> - 2017-05-15 22:17:08
|
Looks like you're using the compiling eval rather than interpreting eval, and the expression being evaluated makes free reference to the specials. You'd have to locally declare them special inside the expression to avoid a warning. On May 15, 2017 5:28 PM, "Peter Münster" <pm...@fr...> wrote: > Hi, > > Why does SBCL warns about undefined variables here: > > --8<---------------cut here---------------start------------->8--- > (let ((inv t) (a 1) (b 2) (c 3)) > (declare (special a b c)) ; because eval must see a, b and c > (eval ; eval, because funcall does not work with "and" and "or" > `(if (,(if inv 'or 'and) (>= a b) (< a c)) > 1 > 0))) > --8<---------------cut here---------------end--------------->8--- > > How could I suppress these warnings and/or enhance the code please? > > TIA for any hints, > -- > Peter > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Sbcl-help mailing list > Sbc...@li... > https://lists.sourceforge.net/lists/listinfo/sbcl-help > |