24,493 ARTICLES
ON THIS WIKI

Template:XOR

Template documentation (for the above template, sometimes hidden or invisible)

This template functions as a binary XOR operation. It will only return a value if only the first or only the second parameter is given, but not if both are.

Syntax[edit]

{{XOR|<condition 1>|<condition 2>|<true output>|<false output>}}

Examples[edit]

  • {{XOR|foo|bar}} gives (nothing)
  • {{XOR|foo|}} gives true
  • {{XOR||bar}} gives true
  • {{XOR||}} gives (nothing)
  • {{XOR|foo|bar|yup|nope}} gives nope
  • {{XOR|foo||yup|nope}} gives yup
  • {{XOR||bar|yup|nope}} gives yup

See also[edit]

Visit Template:XOR/doc to change this text! (How does this work?)

Done making changes? Refresh this text! (Why?)