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

"Array" variables that aren't set, and NO_UNSET



Consider:

zsh% setopt | grep set
nounset             off
zsh% echo ${thisisnotavariable}

zsh% echo ${thisisnotavariable[1]}
zsh: closing brace expected
zsh% 

Why is it a *syntax* error to subscript a variable that's not set, when
it is not a syntax error to refer to the string value of such a variable?

-- 
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"




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