On Fri, 3 Sep 2004 17:08:00 -0700, [EMAIL PROTECTED] (Larry Wall) wrote:
> On Fri, Sep 03, 2004 at 05:45:12PM -0600, John Williams wrote:
> : On Thu, 2 Sep 2004, Larry Wall wrote:
> : 
> : > The argument to a shape specification is a semicolon list, just like
> : > the inside of a multidimensional subscript.  Ranges are also allowed,
> : > so you can pretend you're programming in Fortran, or awk:
> : >
> : >     my int @ints is shape(1..4;1..2); # two dimensions, @ints[1..4; 1..2]
> : 
> : What happens when the Pascal programmer declares
> : 
> :     my int @ints is shape(-10..10);
> : 
> : Does it blow up?
> 
> No.
> 
> : If not, does  @ints[-1]  mean the element with index -1 or the last element?
> 
> The element with index -1.  Arrays with explicit ranges don't use the
> minus notation to count from the end.  We probably need to come up
> with some other notation for the beginning and end indexes.  But it'd
> be nice if that were a little shorter than:
> 
>     @ints.shape[0].beg
>     @ints.shape[0].end
> 
> Suggestions?  Maybe we just need integers with "whence" properties... :-)

How about keywords c<lo> and c<hi>?

> 
> Larry



Reply via email to