I do not know why, but the following three postings with bug reports about array bugs with "${a[@]}, a=() and bool -A never made it to the list. Can someone check the spam filter of the lists for the emails?
Wendy ---------- Forwarded message ---------- From: Wendy Lin <wendlin1...@gmail.com> Date: 10 July 2013 08:06 Subject: "${a[@]}" returns random numbers for Boolean associative array (bool -A) To: ast-develop...@research.att.com, ast-us...@research.att.com Cc: David Korn <d...@research.att.com> "${a[@]}" returns random numbers for Boolean associative array (bool -A): ksh -c 'bool -A a=( [2]=true [4]=false ) ; printf "1=%q\n" "${a[@]}" ; a=( ) ; printf "2=%q\n" "${a[@]}"' 1=37792 1=37824 2= AFAIK it should print: 1=true 1=false 2= This happens with the latest 2013-06-28. If you have a patch please share it before the next release. Thank you! Wendy ---------- Forwarded message ---------- From: Wendy Lin <wendlin1...@gmail.com> Date: 10 July 2013 07:44 Subject: ksh93 returns "()" for "${a[@]}" if I clear an array with a=( ) To: ast-us...@research.att.com Cc: David Korn <d...@research.att.com> ksh93 returns "()" for "${a[@]}" if I clear an array with a=( ) ksh -c 'typeset -a a=( 4 6 ) ; printf "1=%q\n" "${a[@]}" ; a=( ) ; printf "2=%q\n" "${a[@]}"' 1=4 1=6 2=$'(\n)' This happens with 2012-08-01 and the latest 2013-06-28 /bin/ksh --version version sh (AT&T Research) 93u+ 2012-08-01 If you have a patch please share it before the next release. Thank you! Wendy ---------- Forwarded message ---------- From: Wendy Lin <wendlin1...@gmail.com> Date: 10 July 2013 07:31 Subject: Clearing an array with a=() doesn't reset the index counter for the next array element to add To: ast-us...@research.att.com Cc: David Korn <d...@research.att.com> Clearing an array with a=() doesn't reset the index counter for the next array element to add. Example: ksh -c 'typeset -a a=( [0]=first ) ; a=() ; a+=( another_first ) ; print -v a' ( [1]=another_first ) I would expect that after a a=() the position where an add operation inserts an element is index 0 and not index 1. Or is this intended? This happens with 2012-08-01 and the latest 2013-06-28 /bin/ksh --version version sh (AT&T Research) 93u+ 2012-08-01 If you have a patch please share it before the next release. Thank you! Wendy _______________________________________________ ast-developers mailing list ast-developers@lists.research.att.com http://lists.research.att.com/mailman/listinfo/ast-developers