[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: uniform-array-read!
From: |
Marius Vollmer |
Subject: |
Re: uniform-array-read! |
Date: |
Sun, 12 Feb 2006 03:19:05 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
address@hidden (Ludovic Courtès) writes:
> $ guile-1.7
> guile> (make-uniform-array #\a 10)
> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
> guile> (make-uniform-array #\nul 10)
> #s8(15 -44 -17 16 16 4 118 8 0 0)
> guile> (make-uniform-array #\001 10)
> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
>
> All the results differ. Notably, Guile 1.7 fails to properly initialize
> the arrays returned.
Yep, that was a bug in dimensions->uniform-array, which didn't handle
an omitted 'fill' parameter correctly. The result was that not array
created with make-uniform-array was initialized.
Thanks for spotting this!
But note that make-uniform-array is deprecated in 1.7 and the
imminent 1.8; use make-typed-array instead:
guile> (make-typed-array 's8 0 10)
#s8(0 0 0 0 0 0 0 0 0 0)
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
- Re: uniform-array-read!, Ludovic Courtès, 2006/02/01
- Re: uniform-array-read!, Kevin Ryde, 2006/02/02
- Re: uniform-array-read!, Alan Bram, 2006/02/02
- Re: uniform-array-read!, William Xu, 2006/02/02
- Re: uniform-array-read!, William Xu, 2006/02/02
- Re: uniform-array-read!, Alan Bram, 2006/02/03
- Re: uniform-array-read!, William Xu, 2006/02/03
- Re: uniform-array-read!, Marius Vollmer, 2006/02/04
- Re: uniform-array-read!, Alan Bram, 2006/02/04
Re: uniform-array-read!,
Marius Vollmer <=