On Tue, 28 Jan 2003, Dan Sugalski wrote:
> At 10:13 AM -0800 1/28/03, Michael Lazzaro wrote:
>
> >     @a[ Inf ]     # undef      (warning: can't use Inf as array index)
>
> I'd throw an exception here.
>
> >     @a[-4]        # undef   (warning: index out-of-bounds)
> >     @a[-Inf]      # undef   (warning: can't use Inf as array index)
>
> Or zero, since it's an int array.

If you throw an exception for +Inf, you should throw it for -Inf too.

~ John Williams

Reply via email to