🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #728

Re: why &| dont work and its possible to make it work

#728
From: chine.bleu
Date: Sat, 24 Oct 2026 10:16
22 lines
2112 bytes
scott@slp53.sl.home (Scott Lurndal) wrote:
> fir <profesor.fir@gmail.com> writes:
>> sady this plan of using | & failed becouse its said that here for example
>>
>>      if(target<0 ||target>=bag_max ||!bag[target].enabled)   {}
>>
>> if target is -1 in case of | the last one will be evalueated too
>> and it may be segfault
>
> If the first test is true, the remaining tests will not be
> executed.
>
> If you knew C, you'd have known that.
>

I prefer the visibility of ?: to the implicitness of || &&

-- 
Siri Seal of Disavowal #777-000. Disavowed. Denied.  @
NO KINGS    For I desire mercy not sacrifice.       /|\
The Church of the Holey Apple .signature 5.5        / \
of Discordian Mysteries. This post insults Islam. Mohamed
Technical Details
Message-ID: <11bi0ij$2jrg7$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: <117mere$3a14a$1@dont-email.me> <11bda5e$vdh3$1@dont-email.me> <%EtCS.3$dnHe.0@fx46.iad>

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: "chine.bleu" <chine.bleu@yahoo.com>
Newsgroups: comp.lang.c
Subject: Re: why &| dont work and its possible to make it work
Date: Sat, 24 Oct 2026 03:16:51 -0700
Organization: semi-chaotic
Lines: 22
Message-ID: <11bi0ij$2jrg7$1@dont-email.me>
References: <117mere$3a14a$1@dont-email.me> <11bda5e$vdh3$1@dont-email.me> <%EtCS.3$dnHe.0@fx46.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 24 Oct 2026 10:16:52 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2747911"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19F9rlB3omsxIESPxLjamATVM7jKTC67mI="; posting-host="c5e99e91e1d4e6f0065071aa5358e1f2"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0 SeaMonkey/2.29.1
Cancel-Lock: sha1:I13HuBl8EXaiN69BJgQzHVFmdmI= sha256:e8zoRTDfYuJi5/2wQO010+z8pBFvzf4Bu+09rbMUWtc=
	sha1:gY+sS1WPUzWDLKo/IHSZnh5LNik= sha256:qBce+SP0xZWnVocIRJ8H6xEe6lwADPAlpQNH/MXpqmU=
In-Reply-To: <%EtCS.3$dnHe.0@fx46.iad>