Article View: comp.lang.c++
Article #594Re: “The end of software secrecy is almost upon
From: Steven G. Kargl
Date: Fri, 23 Oct 2026 04:10
Date: Fri, 23 Oct 2026 04:10
70 lines
4101 bytes
4101 bytes
On Fri, 23 Oct 2026 03:33:44 -0000 (UTC), Lawrence D’Oliveiro wrote:
> On Thu, 22 Oct 2026 11:18:03 -0400, James Kuyper wrote:
>
>> On Thu, 22 Oct 2026 00:24:48 -0000 (UTC), Lawrence D’Oliveiro wrote:
>>
>>> The principle applies to Fortran as it does to any language where
>>> you have to explicitly manage storage allocations.
>>
>> So, why can't you provide an example of storage allocation, where
>> cleanup is relevant, so that using a GOTO would be problematic. That
>> way we could have some idea what you're talking about.
>
> The technique I use is based on a form of structured programming
> called a “Nassi-Shneiderman diagram”. The overall structure looks like
>
> ... initialize object pointer to NULL ...
> do /*once*/
> {
> ... possible other stuff ...
> ... allocate object pointer ...
> if (error occurred)
> break;
goto error;
> ... possible other stuff using object pointer ...
> }
> while (false);
error:
> ... call free(3) (or equivalent) on object pointer ...
>
> So you can see there is no way out of the inner block without passing
> through the dispose call. Using gotos would contribute nothing except
> make it harder to assure yourself of the simplicity of the control
> flow.
>
ROTFL.
"A rose by any other name would smell as sweet." E. Dijkstra?
'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.
outer: do i = 1, 10
...
inner: do j = 1, 10
...
if (condition 1) cycle inner
...
if (condition 2) exit outer
...
if (condition 3) exit inner
...
end do inner
...
end do outer
PS: We're still waiting on a definition of "storage allocation"
and the cleanup required when jumping out of a do-loop in
Fortran?
PPS: rust and folklore removed again.
--
steve
--
steve
Technical Details
Message-ID:
<11bemnv$1enf2$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-mailReferences:
<11amvre$15far$1@dont-email.me> <11b5tdb$2cs5l$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>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: "Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu> Newsgroups: comp.lang.fortran,comp.lang.c++ Subject: Re: “The end of software secrecy is almost upon Date: Fri, 23 Oct 2026 04:10:39 -0000 (UTC) Organization: A noiseless patient Spider Lines: 70 Message-ID: <11bemnv$1enf2$1@dont-email.me> References: <11amvre$15far$1@dont-email.me> <11b5tdb$2cs5l$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> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 23 Oct 2026 04:10:40 +0000 (UTC) Injection-Info: dont-email.me; logging-data="1531362"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Gz2ThESGSzXUvwT8SvJsA"; posting-host="472bb57484ceabb0e777fdb603a52539" User-Agent: Pan/0.164 (Kupiansk) Cancel-Lock: sha1:+Fg9c3Yq8WVYFgCsTXvp5EMJzdk= sha256:EfPIY0XLTHZw7p3zDeg3nD3R0JOljAasQg8WM4yqI3I= sha1:xS0A5JApQERkvZZzkjpev1jWmTs= sha256:hvyvjfFXkr/9TdXX6BepMh745xMUOk8GvGIOfLec9Js=