On Tuesday, January 28, 2003, at 10:20 AM, Dan Sugalski wrote:
Thanks -- I stand corrected, you're almost certainly right. Arrays defined with a cell type that can't be undefined should never return undef, regardless of index. They should instead return the "default" for that type... int(0), num(0.0), str(''), whatever...At 10:13 AM -0800 1/28/03, Michael Lazzaro wrote:1) Edge cases in array indexing:my int @a = (1,2,3); @a[3] # undef (warning: index out-of-bounds)Or a real 0, since you said @a can only return integers.
I also agree @a[Inf] is worthy of an exception. Without objection, so documented.
MikeL