🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1244

Re: does an expression in a logical statement need parenthesis for proper evaluation?

#1244
From: Janis Papanagnou
Date: Sat, 07 Nov 2026 19:39
30 lines
2908 bytes
On 2026-11-07 12:48, David Brown wrote:
> [...]
> 
> My impression is that he is still fiddling with his fork of f2c with an 
> aim to getting as much automation as he can to minimise the manual 
> cleanup, but I could easily be wrong here.  I have no idea if it is 
> possible to automate something to help with such gotos.

It might suffice for such an automation tasks to just mirror such
'goto' structures (unless you intend to create better structured
code through code transformations). - Not long ago I refactored a
legacy program to obtain an equivalent implementation in another
language and the de-spaghettifying turned out to have been really
nasty. (The code had severely convoluted 'goto's and not a single
structured element.) - In principal it's possible to de-'goto' any
source code to obtain structured code. Since I've no experience
with such tools I'm curious what experiences exists in that respect,
especially for trans-language transformations (from a heavily 'goto'
biased language (BASIC, FORTRAN?) to some structured language). -
While looking into the Net and concerning this thread I stumbled
across this reply, though:
   "f2c or pet (for Fortran/C): Older research tools designed
    to parse flat code graphs and reconstruct clean, structured
    if/else and loop components."
which gave the impression that 'f2c' would be able to remove those
'goto's and so I'm wondering why there's (still) 'goto's in the
OP's sample code.

Janis
Technical Details
Message-ID: <11cnuq2$23539$12@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: <11cj4a0$23796$1@dont-email.me> <11cj994$24m06$1@dont-email.me> <11ck0pr$2amtc$1@dont-email.me> <11cl7i3$2pbh3$1@kst.eternal-september.org> <11cn35u$3cl3b$2@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: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: does an expression in a logical statement need parenthesis for
 proper evaluation?
Date: Sat, 7 Nov 2026 20:39:46 +0100
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <11cnuq2$23539$12@dont-email.me>
References: <11cj4a0$23796$1@dont-email.me> <11cj994$24m06$1@dont-email.me>
 <11ck0pr$2amtc$1@dont-email.me> <11cl7i3$2pbh3$1@kst.eternal-september.org>
 <11cn35u$3cl3b$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 07 Nov 2026 19:39:46 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2200681"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19r3+Vp3YwsCn1pRMO3QpZF"; posting-host="98535b79d61f93180b0ad11bff062f11"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:41io+UWLfN2tir3llNsKQnFLjGU= sha256:0op/qq/NjUqV9fbXcDrSJY05HRvEbiHLS8SFaogd8S0=
	sha1:F/O0GTUL3dOWwoidYJh3PX3u14o= sha256:h9zBgBMuBtKKrU10JxVELq9FRM6RCEm2F9EHpj3NUUQ=
In-Reply-To: <11cn35u$3cl3b$2@dont-email.me>
Content-Language: en-US