At Tue, 10 Aug 2004 17:40:24 -0400 (EDT), Daniel B. Faken wrote:
I am working with a C++ library which has methods that take a
'double'.
Using declare(full_specialization, yes) I can get TinyCLOS to
recognize
method calls when the parameter is of the form 1.0001, but not if it is
just '1' - I get an error looking for an <exact> method.
This seems supported by R5RS saying that exactly one of exact? and
inexact? is true, but how can I get my methods to recognized exact
numbers
as well? (I don't really want to define an <exact> case for each one..)
I'm using today's CVS version (thanks for implementing ref's!), and
the
docs say that <exact> and <inexact> are disjoint subclasses of <number>.
How about using <number>?
(define-method (add (x <number>) (y <number>))
(+ x y))