Technology
 

xor

From TI-BASIC Wiki - The free TI-BASIC encyclopedia


:boolean xor boolean

xor will evaluate to true only if one of the expressions is true and the other is false. Which is true and which is false does not matter, but only one can be true and only one can be false.

[edit] Location

  • Test (2nd MATH)
  • LOGIC
  • 3:xor

[edit] Example

:Prompt A,B
:If A=0 xor B=0:Then
:Disp "EITHER A OR B WAS 0","A AND B WERE NOT 0"

This prompts for two numbers, and if one but not both of the numbers were 0, this says so.