cc: [email protected]
Subject: Re: [ast-developers] Weird .sh.name and .sh.subscript values for
multidimensional arrays
--------
> ksh -c 'compound c;typeset -a c.a ; function c.a.unset { printf
> "%s,%s\n" "${.sh.name}" "${.sh.subscript}"; } ; (( c.a[3][6][11][20]=7
> , c.a[3][6][300][20]=7 )) ; unset c'
> c.a,3
> c.a[3][6],11
> Segmentation fault
>
> The crash however is not the issue which troubles me. The values of
> .sh.name and .sh.subscript are:
> I have two elements in the array and would expect three calls of c.a.unset:
> 1. .sh.name=c.a, .sh.subscript=[3][6][11][20]
> 2. .sh.name=c.a, .sh.subscript=[3][6][300][20]
> 3. .sh.name=c.a, .sh.subscript not set (called to dispose the array
> object itself)
>
> The real values in .sh.name and .sh.subscript when c.a.unset() is
> called are dubious at best.
>
> Tina
> --
>
The crash is a bug, but the name and subscript are not.
It should call the unset function with:
name subscript
c.a[3] 6
c.[3][6] 11
c.[3][6][300] 20
However, it crashed before the last unset call.
David Korn
[email protected]
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers