From: bas@phys.uva.nl (Bas V. de Bakker)
To: zsh-workers@math.gatech.edu
Subject: Re: Small bug in zsh 2.6beta9
Date: Wed, 7 Jun 1995 12:10:17 +0200 [thread overview]
Message-ID: <199506071010.AA26184@phys.uva.nl> (raw)
In-Reply-To: <199506070940.MAA08544@leeor.technion.ac.il> (rl@leeor.technion.ac.il)
Zvi Har'El <rl@leeor.technion.ac.il> writes:
>> > if (ornext ^ ret) {
>> >
>> > should read
>> >
>> > if (ornext ^ (ret!=0)) {
> YOU were right all the time. The two lines of code are
> identical. Perhaps the idiom of checking if(a) rather then if(a!=0)
> is not clear to people who are not seasoned C programmers, but
> personally I prefer your original code.
I haven't really followed the discussion, but although "if (a)" and
"if (a!=0)" are equivalent, the two lines above certainly aren't. If
ornext == 1 and ret == 2 then
ornext ^ ret == 3
but
ornext ^ (ret != 0) == 0
Bas.
prev parent reply other threads:[~1995-06-07 10:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-06-05 7:52 Heiko Schroeder
1995-06-05 9:37 ` P.Stephenson
1995-06-07 9:40 ` Zvi Har'El
1995-06-07 10:10 ` Bas V. de Bakker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199506071010.AA26184@phys.uva.nl \
--to=bas@phys.uva.nl \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).