The 'xor'-operator in julia is defined by the following symbol: ⊻
If I am not mistaken this is also the only symbol representing 'xor'.
How are you supposed to type this conveniently?
Am I supposed to copy or paste it into my code or remember the unicode representation by heart?
Julia's REPL has LaTeX-like tab-completion, so you can use \xor<tab>
. If you paste the character in the help mode (pressing ?
in the REPL) you can see how such character tab-completes:
help?> ⊻
"⊻" can be typed by \xor<tab>
help?> α
"α" can be typed by \alpha<tab>
Many editors have similar tab-completions.