From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id LAA23841 for ; Wed, 24 Jul 1996 11:58:02 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id VAA02963; Tue, 23 Jul 1996 21:51:00 -0400 (EDT) Resent-Date: Tue, 23 Jul 1996 21:51:00 -0400 (EDT) From: "Bart Schaefer" Message-Id: <960723185206.ZM4298@candle.brasslantern.com> Date: Tue, 23 Jul 1996 18:52:06 -0700 Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.702 02jul96) To: zsh-workers@math.gatech.edu Subject: Array values and parameter expansion specs MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"s0z_Q2.0.Dk.46Ozn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1750 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu There isn't much documentation in zshexpn.man concerning which of the SPEC forms can be used with array expressions. For example, ${#NAME} describes what happens if NAME is an array, and there are a few mentions of NAME[@], but otherwise there's silence. The stuff in zshparam.man (and the "Array parameters" section of zsh.info) is no more helpful. Consider: zsh% foo=(1 2 3) zsh% echo ${foo[2]:+whee} whee zsh% echo ${foo[2]:-whee} 2 zsh% echo ${foo[2]:=whee} zsh: closing brace expected zsh% What's the distinction? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.nbn.com/people/lantern New male in /home/schaefer: >N 2 Justin William Schaefer Sat May 11 03:43 53/4040 "Happy Birthday"