[ksh93-integration-discuss] Dereferencing an array namereference
Roland Mainz
roland.mainz at nrubsig.org
Tue Sep 25 19:56:21 PDT 2007
David Korn wrote:
> cc: ksh93-integration-discuss at opensolaris.org
> Subject: Re: Re: [ksh93-integration-discuss] Dereferencing an array name reference
> --------
>
> > > However, the behavior of
> > > ${!x[foo]}
> > > is currently undocumented and currently outputs foo. This will be changed
> >
> > Why do you think that this is undocumented? I'd expect that if x is an
> > element in an array [foo] describes the 2nd dimension, expanding to
> > a[x][foo]. Or am I wrong?
>
> I was saying that even in the case that x is an array variable, not a reference,
> that the documentation does not say ${!x[foo]} will yield. It should
> yield x[foo] but it in fact gives foo.
>
> You are correc that if x is a name reference to a[x], then ${!x[foo]} should
> be a[x][foo].
Erm... I thought ksh93 doesn't support the "a[x][foo]"-style syntax...
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)
More information about the ksh93-integration-discuss
mailing list