QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

XOR (boolean) evaluates two conditions and if either of them is True then it returns True, if both of them are True then it returns False, if both of them are False then it returns False.

Syntax

condition [XOR (boolean)](XOR-(boolean)) condition2

Description

Example(s)

Example(s)

Dilemma…


True = NOT False
AndersWon = True
PeterWon = True

IF AndersWon = True XOR PeterWon = True THEN
  PRINT "Thank you for your honesty!"
ELSE
  PRINT "You can't both have won (or lost)!"
END IF


You can't both have won (or lost)!

See Also