bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to do if any (if no so a feature request) to do break continue


From: L A Walsh
Subject: Re: How to do if any (if no so a feature request) to do break continue
Date: Wed, 09 Sep 2020 10:23:44 -0700
User-agent: Thunderbird

On 9/2/2020 2:31 AM, almahdi wrote:
As break 2 is disrupting and exiting loop twice,
How is breaking something not somewhat inherently disrupting?

from current and next outer
scope then how to do if any (or as a feature request) to do
/break continue/
that is to break then immediately continue on reach its next outer scope ?
---
   Ick....
   What is wrong with break 2?  Breaks out loop enclosing current loop.
Same with continue 2 -- continues with next item in loop enclosing
current loop.


   Additionally, for greater clarity, why not allow:

loopA:
 for((i=0;++i<7;); then

loopB:
   while read nstring restline;do
      ...
       if [[ $nstring =~ ^[0]+7$ ]]; then break loopA;
   done

# labels would be immediately before a loop to be target
of a break/continue
Maybe mroe clear?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]