| Date: Sun, 25 Sep 2011 14:20:20 +0200
| From: address@hidden
|
| I am looking for simple examples about the use of the most basic
| functions in the arrays packages in Slib ('array, 'subarray,
| 'array-for-each and 'array-interpolate). I would be very grateful
| if someone could point me to some of them.
(define ra (make-array (A:floR64b) 5 7)) makes a five by seven array
of uninitialized 64-bit floating-point real numbers.
(define ra (make-array (A:fixZ32b -1) 5 7)) makes a five by seven
array of 32-bit integers, all set to -1.
(define ra (make-array (vector #t) 5 7)) makes a five by seven
array of Scheme values, all set to #t.
(array-ref ra 0 6) returns the last column of the first row.
(array-set! ra 88 0 6) sets the last column of the first row to 88.
Notice that the argument after RA is the new value.
http://people.csail.mit.edu/jaffer/ has examples for the subarray,
array-for-each and array-interpolate modules.
_______________________________________________
Slib-discuss mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/slib-discuss