Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

array bug



I found a problem with arrays used inside a function.  I'm running zsh 3.1.6
on Solaris 2.6.  Here's a function that demonstrates the problem.

function arrtest
{
	set -A myarray
	typeset -x myarray
	myarray[1]=arrtest
	print ${myarray[1]}
}

When I run this it prints only "a" and not the expected "arrtest".  If I run
this outside of a function it works properly.  Also if I reverse the order of
the first two lines of the function it works properly.

Dave
-- 
+----------------------------------------------------+
|   Dave Gaulke           email: gaulke@xxxxxxxxxx   |
|   Lucent Technologies   voice: 303.538.5168        |
|   11900 N. Pecos St.      fax: 303.538.6697        |
|   Denver, CO  80234                                |
+----------------------------------------------------+



Messages sorted by: Reverse Date, Date, Thread, Author