Abdulaziz Ghuloum wrote:

(import (ikarus foreign))

(define srandom ((make-c-callout 'void '(unsigned-long))
>   (dlsym (dlopen) "srandom")))

(srandom 2008)

Just curious about something here. srandom wants an unsigned-long. I passed it some pretty big numbers, definately out of unsigned-long range and it seems to work fine. Is Ikarus taking care of wrapping bignums into the unsigned-long range safely? Or is it something I should check before passing it onto srandom?

I'll probably use (time-second (current-time)) in many cases which seems like it should be fine.

Ed

Reply via email to