🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c++
Article #744

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

#744
From: Lynn McGuire
Date: Thu, 05 Nov 2026 23:42
20 lines
1479 bytes
Hi,

Does an expression in a logical statement need parenthesis for proper 
evaluation in C and/or C++?

In other words, should

if (j1 * i1 < 1) {
     goto L463;
}

be

if ((j1 * i1) < 1) {
     goto L463;
}

Thanks,
Lynn
Technical Details
Message-ID: <11cj4a0$23796$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

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: Lynn McGuire <lynnmcguire5@gmail.com>
Newsgroups: comp.lang.c++,comp.lang.c
Subject: does an expression in a logical statement need parenthesis for proper
 evaluation?
Date: Thu, 5 Nov 2026 17:42:54 -0600
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <11cj4a0$23796$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 05 Nov 2026 23:42:57 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2202918"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18RA9LinCs2ayaAVJDqw5t8P1u5GRDZibg="; posting-host="6e2e47c9dd28e684026fff2f1549ae25"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:bsOkASCxXZGIK1uOpgy41HB0eYI= sha256:JoGee3QpWJNPoGdegaRIzjWNCLjIZxOaBAoI9wjGy/A=
	sha1:pNUAPARb1Hh1XMS7EC0nyCqvljk= sha256:895ZCPgqncS8SmRWh7aZlaOavzm/2TBy8Le9DxP8vi0=
Content-Language: en-US