Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Weird error message when using bash or ksh form of array initialization
- X-seq: zsh-workers 25515
- From: "Rocky Bernstein" <rocky.bernstein@xxxxxxxxx>
- To: "Zsh hackers list" <zsh-workers@xxxxxxxxxx>
- Subject: Weird error message when using bash or ksh form of array initialization
- Date: Sun, 24 Aug 2008 12:05:04 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=lNt8wqDhdARRlagxcew3ax512CBOY2YVhkzEXICbtAc=; b=tkAYYyNTR3G9GrdWAQGkDF6Ok0OzUcPMsMQsqMBtBjg067NQsvoYogWMFNjptTTyTr 1cc4fEF+KZNWsJtXZl499d42HIF8AcXsFaJ03J31DzK1JgaTEKEOGwVsBYd4quuoRYGZ SZZaUD9d0KTTx0guoKo2zR2aABRfGNEqbIe8Q=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=gkoEdftflgjHTjiCh3LbMu9n8Zm/mxDvPUd4UkLg26SquuKruUqhzsNhSSWLWKAfMa letGA0E/8mTCmFwP8wHsuaPAycUHDg3wA9nlvipjsnbCfPggkKFidVbgK5qY+7nn3bo/ Xag+UecMzvfHV1d1AcWMWIh+l2eX+NU3efk7o=
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
When I run this (erroneous?) program:
typeset -a fd=()
typeset -a sources
typeset -i xx
I get a weird error message:
typeset:3: maximum nested function level reached
Note that neither of these give an error:
typeset -a fd=()
typeset -a sources
or
typeset -a fd
typeset -a sources
typeset -i xx
or
typeset -a fd
fd=()
typeset -a sources
typeset -i xx
Somehow fd= is treated as a function which is indicated out by adding
a request to print out fd=:
typeset -a fd=()
typeset -a sources
typeset -i xx
declare -f fd=
Which reports:
typeset:3: maximum nested function level reached
'fd=' () {
typeset -a sources
}
Can someone explain what's going on?
Since both bash and ksh allow an array initialization via the form
used above, it increases the chance of getting this weird error
message.
Thanks.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author