Hi Jeremy,

Thanks for the response. This was with Chicken 5. I found
generalized-arrays easy to understand and I like the api. Most of the other
array eggs either had some limitation or were tough to understand how to
use. However I think I'll be able to make srfi-63 work for now. If you ever
get a chance to fix generalized-arrays I'd likely switch back.

Thanks again,
Matt
-=-

On Thu, Dec 15, 2022 at 12:28 PM Matt Welland <mattrwell...@gmail.com>
wrote:

> This seems like a bug (unless I'm missing something?):
>
> (module justtesting *
> (import scheme chicken.base generalized-arrays storage-classes)
>
> (define (testit)
>   (let* ((size (vector 100 100))
>          (ary  (make-array vector-storage-class size 0)))
>     (with-output-to-file "testarray.dat"
>       (lambda ()
>          (array-write ary)))
>     (print "wrote array to testarray.dat")
>     (let* ((readdata (with-input-from-file "testarray.dat"
>                             array-read)))
>       (print "read data into readdata: "readdata))))
> (testit))
>
> OUTPUT:
>
> wrote array to testarray.dat
>
> Error: Expected a char representing a digit.: #\#
>
> Call history:
>
> array-write-read.scm:1: ##sys#with-environment
> array-write-read.scm:1: ##sys#register-compiled-module
> array-write-read.scm:4: chicken.load#load-extension
> array-write-read.scm:4: chicken.load#load-extension
> array-write-read.scm:34: testit
> array-write-read.scm:23: generalized-arrays#make-array
> array-write-read.scm:24: scheme#with-output-to-file
> array-write-read.scm:27: generalized-arrays#array-write
> array-write-read.scm:28: chicken.base#print
> array-write-read.scm:29: scheme#with-input-from-file   <--
>
> --
> Complexity is your enemy. Any fool can make something complicated.
> It is hard to keep things simple. - Richard Branson.
>


-- 
--
Complexity is your enemy. Any fool can make something complicated.
It is hard to keep things simple. - Richard Branson.

Reply via email to