# Difference between U+007C “VERTICAL BAR” \`|\` and U+2223 “DIVIDES” \`∣\`

**URL:** <https://discourse.julialang.org/t/difference-between-u-007c-vertical-bar-and-u-2223-divides/117499>\
**Category:** Offtopic\
**Tags:** math, unicode, notation\
**Created:** [July 26, 2024, 4:48am UTC](https://discourse.julialang.org/t/difference-between-u-007c-vertical-bar-and-u-2223-divides/117499 "2024-07-26T04:48:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paalon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paalon/32/5784_2.png) [@paalon](https://discourse.julialang.org/u/paalon)\
**Post date:** [July 26, 2024, 4:48am UTC](https://discourse.julialang.org/t/difference-between-u-007c-vertical-bar-and-u-2223-divides/117499/1 "2024-07-26T04:48:57Z")

</div>

What is the difference between the two Unicode code points U+007C “VERTICAL BAR” `|` and U+2223 “DIVIDES” `∣`? [Julia REPL’s LaTeX-like Unicode input](https://docs.julialang.org/en/v1.10.4/manual/unicode-input/) of `\mid` gives U+2223, and [HTML’s named character references](https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references) for `&mid;`, `&shortmid;`, `&smid;` and `&VerticalBar;` are U+2223, and for `&vert;` and `&VerticalLine;` are U+007C. I’m reading “[Report on the Algorithmic Language ALGOL 60](https://doi.org/10.1145/367236.367262)” and it uses `|`-like symbols (what is now called Backus–Naur form) to define ALGOL 60 reference representation. I want to write a document about ALGOL 60 in a modern computer. So I want to replicate the original definition text. I don’t know who first used the vertical line symbol as an “or” operator or seperator. What I know is the vertical line in set (or class) builder notation in mathematics \{x\mid \varphi(x) \} was invented and getting popular around [from 1940s to 1950s](https://mathoverflow.net/questions/327706/who-first-discovered-the-concept-corresponding-to-the-symbol-of-class-comprehens), and in LaTeX, we often use `\mid` in it. Which should I use for replicating ALGOL 60’s text?

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [July 26, 2024, 11:57am UTC](https://discourse.julialang.org/t/difference-between-u-007c-vertical-bar-and-u-2223-divides/117499/2 "2024-07-26T11:57:30Z")

</div>

One answer to your first sentence is that the Unicode people like to encode semantics rather than appearances, so there are lots of examples of similar/different glyphs - eg asterisks.  
Perhaps some fonts containing all the semantic alternatives could visually distinguish between the different meanings - but that might not be what you’re asking. 🤔

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [July 26, 2024, 2:22pm UTC](https://discourse.julialang.org/t/difference-between-u-007c-vertical-bar-and-u-2223-divides/117499/3 "2024-07-26T14:22:09Z")

</div>

In many fonts, U+2223 is shorter than U+007C: `∣|`, ∣|. The reason Julia uses `\mid` for the former from the HTML entity name. I wouldn’t necessarily assume that the HTML `&mid` and the LaTeX `\mid` names come from the same semantic idea.

Given that the unicode is defined to semantically represent “divides” I think I’d use the straightforward ASCII.
