Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to conveniently type the xor (⊻) operator?

Tags:

xor

julia

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?

like image 677
465b Avatar asked Feb 11 '20 16:02

465b


People also ask

How do I type the XOR symbol on my keyboard?

Simply hold down the Alt Key and type 8891. When you lift the Alt Key, ⊻ appears. ("Num Lock" must be on.)

What is the operator type of or and XOR?

Logical Operators are used to perform logical operations and include AND, OR, or NOT. Boolean Operators include AND, OR, XOR, or NOT and can have one of two values, true or false.


1 Answers

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.

like image 160
fredrikekre Avatar answered Oct 24 '22 08:10

fredrikekre