zsh-workers
 help / color / mirror / code / Atom feed
* Nasty bug in array-element typeset assignments
@ 2001-07-26  5:13 Bart Schaefer
  2001-07-26  9:23 ` Peter Stephenson
  0 siblings, 1 reply; 15+ messages in thread
From: Bart Schaefer @ 2001-07-26  5:13 UTC (permalink / raw)
  To: zsh-workers

Change `foo' to a special such as `path' in the `oops' function below,
and you get a lovely core dump.  The `local' expression actually changes
the scope of the existing variable!

zagzig% functions oops
oops () {
        local 'foo[1]'=X
        echo $foo
}
zagzig% foo=({0..10})
zagzig% echo $foo
0 1 2 3 4 5 6 7 8 9 10
zagzig% oops
X 1 2 3 4 5 6 7 8 9 10
zagzig% echo $+foo
0

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2001-08-12 18:55 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-26  5:13 Nasty bug in array-element typeset assignments Bart Schaefer
2001-07-26  9:23 ` Peter Stephenson
2001-07-26  9:28   ` Borsenkow Andrej
2001-07-26  9:44     ` Peter Stephenson
2001-07-26  9:57       ` Borsenkow Andrej
2001-07-26 10:04       ` Oliver Kiddle
2001-07-26 11:07         ` Oliver Kiddle
2001-07-26 11:08         ` Borsenkow Andrej
2001-07-26 11:18           ` Borsenkow Andrej
2001-07-26 11:38           ` Oliver Kiddle
2001-07-26 11:45             ` Peter Stephenson
2001-07-26 12:21               ` PATCH: posixbuiltins test (was Re: Nasty bug in array-element typeset assignments) Oliver Kiddle
2001-07-26 13:24             ` Nasty bug in array-element typeset assignments Borsenkow Andrej
2001-07-26 17:49               ` Bart Schaefer
2001-08-12 18:55                 ` PATCH (?): " Bart Schaefer

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).