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.