[gambit-list] Output Vector Ports
Andrew Whaley
andrew at trailgauge.com
Tue Mar 31 15:08:20 EDT 2009
Hi All,
I'm sure I'm doing something stupid here, but I just can't get output
vector ports to work. I've tried these two examples but get the same
result :-
(*let* ((s (make-u8vector 3 0)))
(with-output-to-u8vector s (*lambda* ()
(write-u8 65)
(write-u8 45)
(force-output)))
s)
=> #u8(0 0 0)
(*let* ((s (make-u8vector 3 0)))
(*let* ((p (open-u8vector s)))
(write-u8 65 p)
(write-u8 45 p)
(close-output-port p)
)
s)
=> #u8(0 0 0)
I can get input ports working fine i.e. I can read from a port from the
vectors but the writes seem to completely fail to update the vector. Am
I doing something wrong, or is there a bug in Gambit ? I'm using 4.4.2
on Windows.
Thanks
Andrew
More information about the Gambit-list
mailing list