guile-user
[Top][All Lists]
Advanced

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

Re: array vs. bytevector


From: Johan Hidding
Subject: Re: array vs. bytevector
Date: Thu, 15 Sep 2011 18:19:46 +0200

Hi,
I think I found the answer in that I should use (array-contents ...) as such:
(import (rnrs io ports))
(put-bytevector (%make-void-port "w") (array-contents #2f64((1 2) (3 4))))
Cheers, Johan


2011/9/15 Ludovic Courtès <address@hidden>:
> Hi,
>
> Johan Hidding <address@hidden> skribis:
>
>> It would be simplest if (put-bytevector ...) would
>> accept an array as argument, but this gives a type-error
>
> It actually works with SRFI-4 vectors (info "(guile) SRFI-4 and
> Bytevectors"):
>
>  scheme@(guile-user)> (use-modules(rnrs io ports))
>  scheme@(guile-user)> (put-bytevector (%make-void-port "w") #u8(1 2 3))
>
> Does it help?
>
> Ludo’.
>
>
>



reply via email to

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