bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: logical XOR


From: Chet Ramey
Subject: Re: logical XOR
Date: Thu, 28 Jun 2007 18:58:25 -0400
User-agent: Thunderbird 2.0.0.4 (Macintosh/20070604)

ackstorm wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: i486
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' 
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' 
> -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
> -DHAVE_CONFIG_H   -I.  -I../bash -I../bash/include -I../bash/lib   -g -O2
> uname output: Linux acklap03 2.6.18-4-686 #1 SMP Wed May 9 23:03:12 UTC 2007 
> i686 GNU/Linux
> Machine Type: i486-pc-linux-gnu
> 
> Bash Version: 3.1
> Patch Level: 17
> Release Status: release
> 
> Description:
>       There's bitwise AND and bitwise OR, and logical AND and logical OR, but
>       for XOR there's only the bitwise version.  Would be nice if the logical
>       XOR would also be present (^^).

(!a) != (!b)

should work acceptably for the situations such an operator would be used.

The reason it's not there is because it's not in C.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]