Roland Mainz
2013-08-17 16:02:30 UTC
cc: ast-developers at research.att.com
Subject: Re: Re: [ast-developers] "${_Bool.true}" not working... / was: Re: AT&T Software Technology ast alpha software download update
--------
are of the same type so that b.true works for an array element.
./arch/linux.i386-64/bin/ksh -o nounset -c 'bool -a b=( [4][5]=true )Subject: Re: Re: [ast-developers] "${_Bool.true}" not working... / was: Re: AT&T Software Technology ast alpha software download update
--------
./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; 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
are of the same type so that b.true works for an array element.
; 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
./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
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) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)