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
>>
>> Wendy
>>
>>
> 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
/arch/linux.i386-64/bin/ksh -o nounset -c 'bool b ; nameref nb=b ;
print ${nb.true}'
1
There is a 3rd bug:
./arch/linux.i386-64/bin/ksh -o nounset -c 'bool b ; print
"${b.true},$((b.true))'
1,1
It should print true,1 and not 1,1
${b.true} is not expanding to a true/false string as I need it.
Wendy
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers