[gambit-list] number->integer

Darren Baker darren at wildfire.com.au
Wed Oct 29 18:37:32 EDT 2008


Hi,

This is no doubt Very Bad Practice but it's useful :)

(define flonum->fixnum
    (c-lambda (double) int "___result = (int)___arg1;"))

Cheers,
Darren

Christoph Bauer wrote:
> Hi,
>
> how can I convert a float number to a integer number? Ok,
> there are floor, truncate, round, but the result have always
> a dot in it. I'd like to convert the number - it is 
>    (round (time->seconds (current-time)))
> - to a string without the dot.
>
> Thanks for help!
>
> Christoph Bauer
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>
>
>   

-- 
Darren Baker
CEO, CTO
Wildfire Studios Pty. Ltd.
www.wildfire.com.au





More information about the Gambit-list mailing list