Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Small bug in zsh 2.6beta9
- X-seq: zsh-workers 82
- From: bas@xxxxxxxxxxx (Bas V. de Bakker)
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: Small bug in zsh 2.6beta9
- Date: Wed, 7 Jun 1995 12:10:17 +0200
- In-reply-to: <199506070940.MAA08544@xxxxxxxxxxxxxxxxxxxx> (rl@xxxxxxxxxxxxxxxxxxxx)
Zvi Har'El <rl@xxxxxxxxxxxxxxxxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author