•  Back 
  •  Main 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The GFA-Basic Compendium
Author      : GFA Systemtechnik GmbH
Version     : GFABasic.HYP v2.98 (12/31/2023)
Subject     : Documentation/Programming
Nodes       : 899
Index Size  : 28056
HCP-Version : 3
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Document not found
@help       : Help
@options    : +g -i -s +z
@width      : 75
@hostname   : STRNGSRV
@hostname   : CAB     
@hostname   : HIGHWIRE
@hostname   : THING   
View Ref-Filex XOR y

x, y: iexp

The XOR operator produces the value TRUE if one, but not both, of the arguments
is TRUE. If they are both TRUE, or both FALSE, the result is FALSE.

Unlike OR, where TRUE OR TRUE = TRUE, TRUE XOR TRUE = FALSE. (XOR is the
Boolean Exclusive Disjunction operation.)

Again, XOR works individually on each of the 32 bits of numeric arguments.

    x | y | x XOR y
    --|---|--------
    T | T | F
    T | F | T
    F | T | T
    F | F | F

Examples:

    PRINT FALSE XOR -1
    PRINT -1 XOR 1
    PRINT 0 XOR FALSE

--> The numbers -1, -2, and 0 are printed on the screen.

    x=3
    y=10
    PRINT BIN$(x,4)
    PRINT BIN$(y,4)
    PRINT BIN$(x XOR y,4),x XOR y

--> Displays 0011, 1010, 1001, and 9 on the screen.