1. xor

-- bred for speed. jiri
function xor(object a, object b)
    return not a != not b
end function

new topic     » topic index » view message » categorize

2. Re: xor

I'll add an xor keyword for the next release.
Symmetry and completeness seem to demand it.
Currently we have:

 keyword   function

    not ... not_bits()
     or  ... or_bits()
    and ... and_bits()
    ??? ... xor_bits()

I don't expect that xor will be used much.
I guess this has something to do with the nature of
the logic, and something to do with our lack of a
common word for "xor" in English and other human languages.

Regards,
     Rob Craig
     Rapid Deployment Software
     http://members.aol.com/FilesEu/

new topic     » goto parent     » topic index » view message » categorize

3. Re: xor

On Wed, 28 Oct 1998, Robert Craig wrote:

> I'll add an xor keyword for the next release.
> Symmetry and completeness seem to demand it.

> I don't expect that xor will be used much.
> I guess this has something to do with the nature of
> the logic, and something to do with our lack of a
> common word for "xor" in English and other human languages.

But we do. We use "or" to mean "xor" in English. e.g.:

"You may have the Ice-Cream _or_ the Candy-Floss."

This quite obviously means "one _or_ the other, but not both".
Which is the definition for "xor"... :)

What we don't have is an equivalent for the logical "or"!

--
Carl R White -- Final Year Computer Science at the University of Bradford
E-mail...: cyrek- at -bigfoot.com -- Remove the hyphens before mailing. Ta :)
URL......: http://www.bigfoot.com/~cyrek/
Ykk rnyllaqur rgiokc cea nyemdok ymc giququezka caysgr -- B.Q.Vgesa

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu