cc: ast-develop...@research.att.com Subject: Re: "${a[@]}" returns random numbers for Boolean associative array (bool -A) --------
> "${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! > > Here is the patch for this. ==================cut here=========================== --- old/sh/name.c Mon Jun 24 15:37:10 2013 +++ new/sh/name.c Wed Jul 10 14:39:41 2013 @@ -393,6 +393,8 @@ if(array&NV_ARRAY) { nv_setarray(np,nv_associative); + if(typ) + nv_settype(np,typ,0); } else { ==================cut here=========================== David Korn d...@research.att.com _______________________________________________ ast-developers mailing list ast-developers@lists.research.att.com http://lists.research.att.com/mailman/listinfo/ast-developers