From abae4fe16e26cf027e7c8165d27b93d74bbd18b2 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 18 Jun 2007 13:25:03 +0000 Subject: 23562: add KSH_ZERO_SUBSCRIPT option and leave off by default --- Test/C01arith.ztst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Test/C01arith.ztst') diff --git a/Test/C01arith.ztst b/Test/C01arith.ztst index e4ddebc12..0e9216aaf 100644 --- a/Test/C01arith.ztst +++ b/Test/C01arith.ztst @@ -91,8 +91,13 @@ >3.5 >4 - (( newarray[unsetvar]++ )) - (( newarray[unsetvar]++ )) + (( newarray[unsetvar] = 1 )) +2:error using unset variable as index +?(eval):1: assignment to invalid subscript range + + integer setvar=1 + (( newarray[setvar]++ )) + (( newarray[setvar]++ )) print ${(t)newarray} ${#newarray} ${newarray[1]} 0:setting array elements in math context >array 1 2 -- cgit 1.4.1