chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] <inexact> and <exact>


From: Felix Winkelmann
Subject: Re: [Chicken-users] <inexact> and <exact>
Date: Thu, 12 Aug 2004 07:27:14 +0200
User-agent: Opera M2/7.52 (Win32, build 3834)

On Tue, 10 Aug 2004 20:38:54 -0500, Alex Shinn <address@hidden> wrote:

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))


Yes, but the problem here is that the method-definition is generated
by the FFI parser in this case.


cheers,
felix





reply via email to

[Prev in Thread] Current Thread [Next in Thread]