From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13958 invoked by alias); 6 Jun 2014 21:04:30 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32728 Received: (qmail 10717 invoked from network); 6 Jun 2014 21:04:26 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Originating-IP: [86.6.157.246] X-Spam: 0 X-Authority: v=2.1 cv=W7a2VHmk c=1 sm=1 tr=0 a=BvYiZ/UW0Fmn8Wufq9dPrg==:117 a=BvYiZ/UW0Fmn8Wufq9dPrg==:17 a=NLZqzBF-AAAA:8 a=LGXc4NIGxrIA:10 a=uObrxnre4hsA:10 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=tLFZz2AxXA_oct9yV9cA:9 a=UXcAxl04dlCS_hcm:21 a=hD_O2-TzDu7MjqXw:21 a=CjuIK1q_8ugA:10 a=I6wTmPyJxzYA:10 Date: Fri, 6 Jun 2014 21:58:53 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: break/continue vs. try-always Message-ID: <20140606215853.0c6ecae9@pws-pc.ntlworld.com> In-Reply-To: <140605085319.ZM4272@torch.brasslantern.com> References: <140603191227.ZM28198@torch.brasslantern.com> <140604223723.ZM22960@torch.brasslantern.com> <140605085319.ZM4272@torch.brasslantern.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 05 Jun 2014 08:53:19 -0700 Bart Schaefer wrote: > On Jun 4, 10:37pm, Bart Schaefer wrote: > } Subject: [PATCH] Re: Oddball output from zerrmsg() > } > } ... the "continue" propagates > } up through the dynamic scopes and restarts the "while true;" loop ... > } > } Not even an "always" block can intercept this, which is probably a bug in > } the handling of "always". > > OK, not a bug, exactly. The always-block is in fact executed, but it has > no way to decrement the number of levels of "break" or "continue" that > have been set by the try-block. It can *increase* the number of levels, > but not stop the break/continue from propagating upward. We could do something like add "break -r" to reset. It would only be usable in always blocks (not sure about traps) because otherwise you don't get the chance to execute it. pws