chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] array-lib : empty arrays advertise indices that they


From: John Cowan
Subject: Re: [Chicken-users] array-lib : empty arrays advertise indices that they cannot be indexed by
Date: Sat, 6 Oct 2007 22:53:53 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

Kon Lovett scripsit:

> However, the 'for-each' procedure (and its' various siblings) should  
> ignore an empty array. This is fixed in the 2.114 release.

But a zero-rank array (in languages that support it, like Common Lisp)
is not empty; it has one element (it is a scalar), which can be
retrieved by calling the array-reference function with zero arguments.

In environments where both upper and lower bounds are supported, an
array any of whose dimensions has an upper bound >= the lower bound
is truly empty: it has no elements at all.

-- 
John Cowan    address@hidden    http://ccil.org/~cowan
This great college [Trinity], of this ancient university [Cambridge],
has seen some strange sights. It has seen Wordsworth drunk and Porson
sober. And here am I, a better poet than Porson, and a better scholar
than Wordsworth, somewhere betwixt and between.  --A.E. Housman




reply via email to

[Prev in Thread] Current Thread [Next in Thread]