Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Challenge: Identify ways to use XOR logical operator
#19
Quote:Your second example about doing things the long way reminds me of my favorite example which is for using a flip/flop switch. If the switch is on (a one), you want to turn it off. If the switch is off (zero), you want to turn it on.

Code:
flipflop = flipflop xor 1

Err...
Code:
flipflop = !flipflop
esus saves.... Passes to Moses, shoots, he scores!
Reply


Messages In This Thread
To Seph: - by Moneo - 06-21-2003, 07:41 AM
To LooseCaboose: - by Moneo - 06-21-2003, 08:59 AM
To drV: - by Moneo - 06-21-2003, 09:24 AM
Re: To drV: - by DrV - 06-21-2003, 09:39 AM
To Toonski84 - by Moneo - 06-21-2003, 10:03 AM
Challenge: Identify ways to use XOR logical operator - by LooseCaboose - 06-22-2003, 12:52 PM
Re: To drV: - by relsoft - 06-22-2003, 02:20 PM
Sample reason for using XOR. - by Moneo - 06-23-2003, 09:33 PM
Update: - by Moneo - 07-03-2003, 11:32 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)