Roland Mainz wrote: > The following example uses the copy operator to copy a whole compound > variable via it's name: > -- snip -- > $ ~/bin/ksh -u -c 'compound b=( x=9 ) ; compound a ; a=b ; print -v > a' > ( > x=9 > ) > -- snip -- > > ... but if I replace "a=b" with "a=bx" (where variable "bx" does not > exist) I am getting this: > -- snip -- > $ ~/bin/ksh -u -c 'compound b=( x=9 ) ; compound a ; a=bx ; print -v > a' > bx > -- snip -- > ... somehow I would expect that this would've trigged an "variable not > set" error...
BTW: the same problem occurs for the "merge" operator (+=), e.g. the folloing testcase works as expected... -- snip -- $ ksh93 -u -c 'compound b=( x=9 ) ; compound a ; a+=b ; typeset -p a' typeset -C a=(x=9;) -- snip -- ... but replacing "a+=b" with "a+=bx" results in the following output: -- snip -- $ ksh93 -u -c 'compound b=( x=9 ) ; compound a ; a+=bx ; typeset -p a' a=bx -- snip -- AFAIK this is wrong in two ways: 1. "a" should remain a compound variable 2. Trying to use an non-existing variable "bx" in "unset" mode should trigger an error ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) [email protected] \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) _______________________________________________ ast-users mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/ast-users
