From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13079 invoked from network); 11 Mar 2023 17:51:13 -0000 Received: from minnie.tuhs.org (2600:3c01:e000:146::1) by inbox.vuxu.org with ESMTPUTF8; 11 Mar 2023 17:51:13 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 2154C415BB; Sun, 12 Mar 2023 03:51:11 +1000 (AEST) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) by minnie.tuhs.org (Postfix) with ESMTPS id DE07241579 for ; Sun, 12 Mar 2023 03:51:05 +1000 (AEST) Date: Sat, 11 Mar 2023 18:51:02 +0100 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Ralph Corderoy Message-ID: <20230311175102.Yl3ha%steffen@sdaoden.eu> In-Reply-To: <20230311112508.7306220145@orac.inputplus.co.uk> References: <20230309230130.q4I-f%steffen@sdaoden.eu> <20230310165552.czZmL%steffen@sdaoden.eu> <20230311112508.7306220145@orac.inputplus.co.uk> Mail-Followup-To: Ralph Corderoy , coff@tuhs.org User-Agent: s-nail v14.9.24-432-g67dd7ec606 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 7FYNHU7PAZQRWF6UIR4IJGRAKK33VOOS X-Message-ID-Hash: 7FYNHU7PAZQRWF6UIR4IJGRAKK33VOOS X-MailFrom: steffen@sdaoden.eu X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: coff@tuhs.org X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [COFF] Re: continue N. (Was: I can't drive 55...) List-Id: Computer Old Farts Forum Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Ralph Corderoy wrote in <20230311112508.7306220145@orac.inputplus.co.uk>: |Hi Steffen, | |COFF'd. | |> Very often i find myself needing a restart necessity, so "continue |> N" would that be. Then again when "N" is a number instead of |> a label this is a (let alone maintainance) mess but for shortest |> code paths. | |Do you mean =E2=80=98continue=E2=80=99 which re-tests the condition or mo= re like Perl's |=E2=80=98redo=E2=80=99 which re-starts the loop's body? No Ralph, i unspecifically meant multiple nested loops where some inner has to restart/continue the outer (at some point). So a bit like that of "man perlsyn", but with deeper nesting If you need both "next" and "last", you have to do both and also use= a loop label: LOOP: { do {{ next if $x =3D=3D $y; last LOOP if $x =3D=3D $y**2; # do something here }} until $x++ > $z; } --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)