cc: [email protected]
Subject: Re: Re: [ast-users] Is there a way to pass a variable number of
namerefs to a function?
--------
Here is a complete program that copies any number of source arrays into the
destination passing the array names as references.
function copy_args # dest src ...
{
nameref newarr=$1 arr
for arr in "$@"
do newarr+=(${arr[@]})
done
}
a=(x y z)
b=(a b c)
typeset -a c
copy_args c a b
typeset -p c
David Korn
[email protected]
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users