On 4/21/22 14:59, Bradley Lucier wrote:
> To be honest, I cannot see how SRFI 164 deals with array-ref with arrays some of whose axes have length zero.
The same as vector-ref with a vector or length zero. Which is the same as (array-ref arr 10 10) for a 5x5 array.
I.e. it throws an index-out-of-range error.
> And now, if functionally an array with at least one axis of length zero has
>
> (array-ref a i j k l)
>
> raise an error no matter the number or values of the arguments, is there a difference between empty arrays of different dimensions?
Not really. When you catch and print out data (if any) associated with the error
ideally it should tell you the invalid indexes along with the array bounds, but that's
just to help debugging.
--
--Per Bothner
xxxxxx@bothner.com http://per.bothner.com/