zsh-workers
 help / color / mirror / code / Atom feed
* For loop bug
@ 2002-09-13 18:25 Philippe Troin
  2002-09-13 23:31 ` Peter Stephenson
  0 siblings, 1 reply; 13+ messages in thread
From: Philippe Troin @ 2002-09-13 18:25 UTC (permalink / raw)
  To: zsh-workers

Tried on zsh 4.0.4 and 4.0.6:

  % for i in 1 2 3; do echo $i || break; done && echo X
  1
  X
  2
  X
  3
  X
  X
  % 

That looks somewhat incorrect...

Removing the "|| break" makes it work as expected:

  % for i in 1 2 3; do echo $i; done && echo X 
  1
  2
  3
  X
  % 

Same with grouping the echo and break statements:

  % for i in 1 2 3; do {echo $i || break}; done && echo X
  1
  2
  3
  X
  % 

Or did I miss something?

Phil.


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

end of thread, other threads:[~2002-09-29 13:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-13 18:25 For loop bug Philippe Troin
2002-09-13 23:31 ` Peter Stephenson
2002-09-14  0:34   ` Bart Schaefer
2002-09-14  0:58   ` Philippe Troin
2002-09-14  4:56     ` Bart Schaefer
2002-09-16  4:58       ` Philippe Troin
2002-09-16  6:25         ` Bart Schaefer
2002-09-16 18:26           ` Philippe Troin
2002-09-16 20:46             ` Hans Dieter Pearcey
2002-09-17  0:08               ` Philippe Troin
2002-09-14 14:39   ` Peter Stephenson
2002-09-17 10:47     ` Peter Stephenson
2002-09-29 13:20     ` Sven Wischnowsky

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