Hi!

----

The following testcase should swap two array elements of a type
array... but instead it triggers a syntax error:
-- snip --
typeset -T key_t=(
        float i
)

function f1
{
        compound c=(
                key_t -a ar=(
                        ( i=7 )
                        ( i=1 )
                        ( i=11 )
                        ( i=17 )
                        ( i=9 )
                )
        )
        
        integer i=2
        nameref ar=c.ar
        typeset -m "tmp=ar[i-1]"
        typeset -m "ar[i-1]=ar[i]"
        typeset -m "ar[i]=tmp"
        
        print -v c
}

f1
-- snip --

ast-ksh.2013-04-09 prints this error for the code:
-- snip --
type_sortc.sh[27]: f1[21]: typeset: (
        typeset -l -E i=11
): invalid variable name
-- snip --

----

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