Hi!

----

The following testcase uses $ read -C sar[nsar++] # to read a compound
variable in an element of a compound variable array and then increases
the index by one...
-- snip --
$ ksh -c 'compound -a sar ; integer nsar=0 ; printf "( i=1 )\n(i=2)" |
while read -C sar[nsar++] ; do true ; done ; print -v sar'
-- snip --

AFAIK the testcase should print...
-- snip --
(
        (
                i=1
        )
        (
                i=2
        )
)
-- snip --
... but ast-ksh.2013-04-09 on SuSE 12.3/AMD64/64bit prints:
-- snip --
(
        (
        )
        (
                i=1
        )
        (
        )
        (
                i=2
        )
)
-- snip --
... it looks like the variable name passed to read -C is evaluated twice...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [email protected]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to