On Tue, Sep 18, 2012 at 2:38 AM, Roland Mainz <roland.ma...@nrubsig.org> wrote: > Printing a user-defined type variable via a plain print ${var} seems > to cause indexed compound variable arrays to loose their "-C" > attribute in ast-ksh.2012-09-11: > -- snip -- > $ ksh -c 'typeset -T x_t=( compound -a x ) ; x_t y ; print "${y}"' > ( > typeset -a x > ) > -- snip -- > ... the same works OK for associative compound variable arrays: > -- snip -- > $ ksh -c 'typeset -T x_t=( compound -A x ) ; x_t y ; print "${y}"' > ( > typeset -C -A x > ) > -- snip -- > > The same happens for typeset -p: > -- snip -- > $ ksh -c 'typeset -T x_t=( compound -a x ) ; x_t y ; typeset -p y.x"' > typeset -a y.x='' > -- snip -- > (note the value of '' - how can this be legal for an array ?) > > ... the output for associative seems to be correct: > -- snip -- > $ ksh -c 'typeset -T x_t=( compound -A x ) ; x_t y ; typeset -p y.x"' > typeset -C -A y.x=() > -- snip --
... and here is another, likely related issue: -- snip -- $ ksh -c 'typeset -T x_t=( integer -a x=( [7]=1 ) ) ; x_t y ; typeset -p y.x"' typeset -a -l -i y.x=(1) -- snip -- ... somehow I would've expected the output to be: -- snip -- typeset -a -l -i y.x=( [7]=1 ) -- snip -- Basically all indexed array types made out of basic shell types (string, integer, float, compound) are affected... ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.ma...@nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) _______________________________________________ ast-developers mailing list ast-developers@research.att.com https://mailman.research.att.com/mailman/listinfo/ast-developers