On Mon, Aug 12, 2013 at 5:52 PM, Wendy Lin <[email protected]> wrote: > On 12 August 2013 14:33, David Korn <[email protected]> wrote: >> cc: [email protected] >> Subject: Re: Re: [ast-developers] "${_Bool.true}" not working... / was: Re: >> AT&T Software Technology ast alpha software download update >> -------- >> >>> But there is still a bug left: >>> >>> var.true/var.false don't work for array elements: >>> ./arch/linux.i386-64/bin/ksh -o nounset -c 'bool -a b=( [4][5]=true ) >>> ; print $((b[4][5].true))' >>> ./arch/linux.i386-64/bin/ksh: b[4][5].true: parameter not set >>> ./arch/linux.i386-64/bin/ksh -o nounset -c 'bool -A b=( [lin]=true ) ; >>> print $((b[lin].true))' >>> ./arch/linux.i386-64/bin/ksh: b[lin].true: parameter not set >>> >> There is no need for that to work since all elements of any array >> are of the same type so that b.true works for an array element. > > It doesn't work in ksh 93v- 2013-08-05: > ./arch/linux.i386-64/bin/ksh -o nounset -c 'bool -a b=( [4][5]=true ) > ; print $((b[4][5].true))' > ./arch/linux.i386-64/bin/ksh: b[4][5].true: parameter not set > > The reason why I want this to work are references, after which you can > no longer differ between plain bool and array element book: > ./arch/linux.i386-64/bin/ksh -o nounset -c 'bool -a b=( [4][5]=true ) > ; nameref nb=b[4][5] ; print ${nb.true}' > ./arch/linux.i386-64/bin/ksh: nb.true: parameter not set
Mhhh... I agree with Wendy that this should be fixed... otherwise it's becoming very hard to implement some algorithms which operate on enums with conditional use of namerefs. I just ran into that trouble when working on the "bool.sh" testsuite module (the same should work for associative bool arrays, too). ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) [email protected] \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) _______________________________________________ ast-developers mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-developers
