zsh-users
 help / color / mirror / code / Atom feed
From: "Atte Peltomäki" <atte.peltomaki@iki.fi>
To: zsh-users@zsh.org
Subject: Local arrays
Date: Wed, 6 Feb 2013 17:41:08 +0200	[thread overview]
Message-ID: <20130206154108.GE88322@ass.pp.htv.fi> (raw)

Hi,

Can someone explain the following behaviour in declaring local arrays?

% F () { local -a foo=(one two three); echo $foo ; }
% F
F: unknown file attribute

% F () { local foo=(one two); echo $foo ; }
% F
F: missing end of string

% F () { local foo=(moi hei); echo $foo ; }
% F
F: number expected

% F () { local -a foo; foo=(one two three); echo $foo ; }
% F
one two three

% echo $ZSH_VERSION
4.3.17

-- 
Atte Peltomäki
     atte.peltomaki@iki.fi <> http://kameli.org
"Your effort to remain what you are is what limits you"


             reply	other threads:[~2013-02-06 15:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06 15:41 Atte Peltomäki [this message]
2013-02-06 16:01 ` Peter Stephenson
  -- strict thread matches above, loose matches on Subject: below --
1999-01-13 10:12 local arrays Phil Pennock
1999-01-13 16:15 ` Bart Schaefer
1999-01-13 16:58   ` Phil Pennock
1999-01-13 16:57     ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130206154108.GE88322@ass.pp.htv.fi \
    --to=atte.peltomaki@iki.fi \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).