Please see attached typescript. What am I doing wrong with my c-to-scheme and scheme-to-c functions?
c-define-type has a form of:
(c-define-type type type c-to-scheme scheme-to-c)
Thanks!
(I want this lax-double to be a type where I can send it ints and it'll autoamtically become doubles)
On Tue, May 19, 2009 at 1:48 PM, Marc Feeley feeley@iro.umontreal.cawrote:
On 19-May-09, at 4:44 PM, lowly coder wrote:
This is a lot of manual wrapping. Can I define a 'type' like a
lenient-double to have this automatically called? (Then I can sed my *.scm for double -> lenient-double)
Yes you can define your own type with converter functions. The hardest thing to implement is the conversion of bignums and exact rationals to double (the exact->inexact function does this in Scheme).
Marc