๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #168

Re: โ€œThe end of software secrecy is almost upon

#168
From: Thomas Koenig
Date: Fri, 23 Oct 2026 05:43
35 lines
3264 bytes
Keith Thompson <Keith.S.Thompson+u@gmail.com> schrieb:
> "Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu> writes:
> [...]
>> 'break' is just another name for 'goto label'.  Fortran offers
>> 'cycle' and 'exit' to either return to the top of a loop (
>> similar to C's 'continue') or to jump out of loop.  Fortran 
>> has named constructs, so one can use 'cycle' and 'exit' on
>> (deeply?) nested constructs. 
>
> Any given C break statement is equivalent to a goto statement that
> jumps just after the enclosing loop or switch statement.
>
> But "break" is useful because it can't branch to any arbitrary point
> in the enclosing function.  It can only break out of a specific
> enclosing construct.  That makes the code easier to read and write.

The goto usually isn't the problem, you see it and you see where its
target is.

It is the "come from".  You see a label, and you wonder what the
state of the program is when you arrive there, and (if applicable)
which of the several gotos went there.

For error handling, this can be a win.

> BTW, the next C standard is planned to add named loops and breaks,
> which are also proposed for C++.  Some C compilers already implement
> them as an extension.

Makes sense. Fortran has had them for a looong time.

-- 
This USENET posting was made without artificial intelligence,
artificial impertinence, artificial arrogance, artificial stupidity,
artificial flavorings or artificial colorants.
Technical Details
Message-ID: <11bes6s$1gjb3$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11amvre$15far$1@dont-email.me> <11b64cp$end$1@panix2.panix.com> <11b64hj$2faos$1@dont-email.me> <11b679m$6dl$1@panix2.panix.com> <11b6vc4$2npqv$1@dont-email.me> <11b87jg$37b7t$1@dont-email.me> <11b884b$p2o9$1@dont-email.me> <11b94he$3hdo3$2@dont-email.me> <11b9qd6$pq4i$1@dont-email.me> <11b9r5r$3nppf$1@dont-email.me> <11baekk$3v7n1$1@dont-email.me> <11bbl4f$du80$2@dont-email.me> <11bbo58$ek3q$1@dont-email.me> <11bbqns$fe31$1@dont-email.me> <11bbron$fmi2$1@dont-email.me> <11bc09b$gsv1$1@dont-email.me> <11bc3m0$hnan$1@dont-email.me> <11bc4m2$i1rd$1@dont-email.me> <11bd9fd$v6su$1@dont-email.me> <11bekio$1eab6$4@dont-email.me> <11bemnv$1enf2$1@dont-email.me> <11benbt$1f649$1@kst.eternal-september.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Thomas Koenig <tkoenig@netcologne.de>
Newsgroups: comp.lang.fortran,comp.lang.c++
Subject: Re: โ€œThe end of software secrecy is almost upon
Date: Fri, 23 Oct 2026 05:43:56 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <11bes6s$1gjb3$1@dont-email.me>
References: <11amvre$15far$1@dont-email.me> <11b64cp$end$1@panix2.panix.com>
 <11b64hj$2faos$1@dont-email.me> <11b679m$6dl$1@panix2.panix.com>
 <11b6vc4$2npqv$1@dont-email.me> <11b87jg$37b7t$1@dont-email.me>
 <11b884b$p2o9$1@dont-email.me> <11b94he$3hdo3$2@dont-email.me>
 <11b9qd6$pq4i$1@dont-email.me> <11b9r5r$3nppf$1@dont-email.me>
 <11baekk$3v7n1$1@dont-email.me> <11bbl4f$du80$2@dont-email.me>
 <11bbo58$ek3q$1@dont-email.me> <11bbqns$fe31$1@dont-email.me>
 <11bbron$fmi2$1@dont-email.me> <11bc09b$gsv1$1@dont-email.me>
 <11bc3m0$hnan$1@dont-email.me> <11bc4m2$i1rd$1@dont-email.me>
 <11bd9fd$v6su$1@dont-email.me> <11bekio$1eab6$4@dont-email.me>
 <11bemnv$1enf2$1@dont-email.me> <11benbt$1f649$1@kst.eternal-september.org>
Injection-Date: Fri, 23 Oct 2026 05:43:57 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="1592675"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19ck+YvIp59lu01UcGcG2szCiX0pw/HUvs="; posting-host="3900dbfb29f420c233751a54355a656c"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:4FNUzFE52bOzJczzJdiXKQW2Vhw= sha256:/zfBLpqn6s0s9eylc0NJVN/PDotCMyI+PBTjKTPFRQU=
	sha1:01HwGCHrDMzZBl70tZN1MTr+Ufk= sha256:ZL8a017aH3N4q0sV/DjRw+Txe4ruskuDP2vHIWh0C3M=