Deutsch English Français Italiano |
<v40ge7$2edfj$3@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro <ldo@nz.invalid> Newsgroups: comp.lang.c Subject: Re: Shortcut Booleans Date: Sat, 8 Jun 2024 02:42:15 -0000 (UTC) Organization: A noiseless patient Spider Lines: 9 Message-ID: <v40ge7$2edfj$3@dont-email.me> References: <v3uoq3$21g4g$7@dont-email.me> <v3uv51$22afr$2@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 08 Jun 2024 04:42:15 +0200 (CEST) Injection-Info: dont-email.me; posting-host="41ddd3104c6f00811ea81eed5288e7ff"; logging-data="2569715"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198QH/HsJ31mMm2twjM+67w" User-Agent: Pan/0.158 (Avdiivka; ) Cancel-Lock: sha1:xkYAkxGoRqHmKYjZfFORMfeI9Wc= Bytes: 1249 On Fri, 7 Jun 2024 13:41:06 +0100, bart wrote: > Common sense applies, otherwise you could shortcut these operations: > > a * b // when a is zero, the result is zero > a & b // when a is zero And why not? It would depend on the complexity of the “a” and “b” subexpressions, of course.