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

Local arrays



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@xxxxxx <> http://kameli.org
"Your effort to remain what you are is what limits you"



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