Hi y'all,
Using Guile 1.7:
guile> (define a (make-uniform-array #\nul 10))
guile> (uniform-array-read! a (open-input-string (string #\001 #\002 #\003)))
3
guile> a
#s8(1 2 3 32 51 10 -102 96 48 10)
guile>
IOW, it seems to work fine --- except that:
1. The array is not properly initialized;
2. The result is not a string as one would expect from the Guile 1.6
manual[*] (in fact it could hardly be a string since internally
strings may not contain null characters AFAIK).
So 1.7 is _not_ compatible with 1.6 in that respect. I guess we need to
fix this.
Here is the same in 1.6, just for good measure:
guile> (define a (make-uniform-array #\nul 10))
guile> a
#y(0 0 0 0 0 0 0 0 0 0)
guile> (uniform-array-read! a (open-input-string (string #\001 #\002 #\003)))
3
guile> a
#y(1 2 3 0 0 0 0 0 0 0)
The result is not a string, probably because the array was originally
defined to be filled with null chars. If I define the array to originally
contain some valid character, then subsequently it displays as a string.
Regards,
Jon
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user