From: Jim N. <jn...@lr...> - 2018-03-14 16:06:09
|
I’m using SBCL 1.4.3.142-fffb62d on MacOS > On 14 Mar 2018, at 17:03, Jeff Cunningham <je...@jk...> wrote: > > I don't see any warning when I compile it. Which SBCL version? > --Jeff > > (format t "~(~36r@~36r.~36r)~)" <mailto:~(~36r@~36r.~36r)~)> 42231320458 2575240748151138958 16438) > On 03/14/2018 07:07 AM, Jim Newton wrote: >> I get the following compiler warning on the following code. But I can't figure how to fix it. >> Can someone give me a suggestion? >> >> -+ style-warning (1) >> `-- This is not a REAL: >> NIL >> See also: >> SBCL Manual, Handling of Types [:node] >> >> See also: >> SBCL Manual, Handling of Types [:node] >> >> >> >> (defun foo (num-tries) >> (let (result) >> (dotimes (try num-tries) >> (let ((run-time (random 100))) >> (setf result >> (cond >> ((not result) >> (list :run-time (the real run-time))) >> ((< run-time (the real (getf result :run-time))) ;; WARNING HERE >> (list :run-time run-time)) >> (t >> result))))) >> result)) >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot <http://sdm.link/slashdot> >> >> _______________________________________________ >> Sbcl-devel mailing list >> Sbc...@li... <mailto:Sbc...@li...> >> https://lists.sourceforge.net/lists/listinfo/sbcl-devel <https://lists.sourceforge.net/lists/listinfo/sbcl-devel> > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________ > Sbcl-devel mailing list > Sbc...@li... > https://lists.sourceforge.net/lists/listinfo/sbcl-devel |