Vertical bar

From Wikipedia for FEVERv2
Jump to navigation Jump to search

"|" redirects here. Vertical bar_sentence_0

For the use of a similar-looking character in vertical Japanese writing, see Chōonpu. Vertical bar_sentence_1

" ‖ " redirects here. Vertical bar_sentence_2

For the use of a similar-looking character in African languages, see lateral clicks. Vertical bar_sentence_3

Not to be confused with dental click. Vertical bar_sentence_4

The vertical bar,  | , is a glyph with various uses in mathematics, computing, and typography. Vertical bar_sentence_5

It has many names, often related to particular meanings: Sheffer stroke (in logic), pipe, vbar, stick, vertical line, vertical slash, bar, pike, or verti-bar, and several variants on these names. Vertical bar_sentence_6

It is occasionally considered an allograph of broken bar (see below). Vertical bar_sentence_7

Usage Vertical bar_section_0

Mathematics Vertical bar_section_1

The vertical bar is used as a mathematical symbol in numerous ways: Vertical bar_sentence_8

Physics Vertical bar_section_2

The vertical bar is used in bra–ket notation in quantum physics. Vertical bar_sentence_9

Examples: Vertical bar_sentence_10

Computing Vertical bar_section_3

Pipe Vertical bar_section_4

Main article: Pipeline (Unix) Vertical bar_sentence_11

A pipe is an inter-process communication mechanism originating in Unix, which directs the output (standard out and, optionally, standard error) of one process to the input (standard in) of another. Vertical bar_sentence_12

In this way, a series of commands can be "piped" together, giving users the ability to quickly perform complex multi-stage processing from the command line or as part of a Unix shell script ("bash file"). Vertical bar_sentence_13

In most Unix shells (command interpreters), this is represented by the vertical bar character. Vertical bar_sentence_14

For example: Vertical bar_sentence_15

where the output from the grep process is piped to the more process. Vertical bar_sentence_16

The same "pipe" feature is also found in later versions of DOS and Microsoft Windows. Vertical bar_sentence_17

This usage has led to the character itself being called "pipe". Vertical bar_sentence_18

Disjunction Vertical bar_section_5

In many programming languages, the vertical bar is used to designate the logic operation or, either bitwise or or logical or. Vertical bar_sentence_19

Specifically, in C and other languages following C syntax conventions, such as C++, Perl, Java and C#, a | b denotes a bitwise or; whereas a double vertical bar a || b denotes a (short-circuited) logical or. Vertical bar_sentence_20

Since the character was originally not available in all code pages and keyboard layouts, ANSI C can transcribe it in form of the trigraph ?? Vertical bar_sentence_21

!, which, outside string literals, is equivalent to the | character. Vertical bar_sentence_22

In regular expression syntax, the vertical bar again indicates logical or (alternation). Vertical bar_sentence_23

For example: the Unix command grep -E 'fu|bar' matches lines containing 'fu' or 'bar'. Vertical bar_sentence_24

Concatenation Vertical bar_section_6

The double vertical bar operator "||" denotes string concatenation in PL/I, standard ANSI SQL, and theoretical computer science (particularly cryptography). Vertical bar_sentence_25

Delimiter Vertical bar_section_7

Although not as common as commas or tabs, the vertical bar can be used as a delimiter in a . Vertical bar_sentence_26

Examples of a pipe-delimited standard data format are LEDES 1998B and HL7. Vertical bar_sentence_27

It is frequently used because vertical bars are typically uncommon in the data itself. Vertical bar_sentence_28

Similarly, the vertical bar may see use as a delimiter for regular expression operations (e.g. in sed). Vertical bar_sentence_29

This is useful when the regular expression contains instances of the more common forward slash (/) delimiter; using a vertical bar eliminates the need to escape all instances of the forward slash. Vertical bar_sentence_30

However, this makes the bar unusable as the regular expression "alternative" operator. Vertical bar_sentence_31

Backus–Naur form Vertical bar_section_8

In Backus–Naur form, an expression consists of sequences of symbols and/or sequences separated by '|', indicating a choice, the whole being a possible substitution for the symbol on the left. Vertical bar_sentence_32

Concurrency operator Vertical bar_section_9

In calculi of communicating processes (like pi-calculus), the vertical bar is used to indicate that processes execute in parallel. Vertical bar_sentence_33

APL Vertical bar_section_10

The pipe in APL is the modulo or residue function between two operands and the absolute value function next to one operand. Vertical bar_sentence_34

List comprehensions Vertical bar_section_11

Main article: List comprehensions Vertical bar_sentence_35

The vertical bar is used for list comprehensions in some functional languages, e.g. Haskell and Erlang. Vertical bar_sentence_36

Compare set-builder notation. Vertical bar_sentence_37

Text markup Vertical bar_section_12

The vertical bar is used as a special character in lightweight markup languages, notably MediaWiki's Wikitext (in the templates and internal links). Vertical bar_sentence_38

In LaTeX text mode, the vertical bar produces an em dash (—). Vertical bar_sentence_39

The \textbar command can be used to produce a vertical bar. Vertical bar_sentence_40

Phonetics and orthography Vertical bar_section_13

In the Khoisan languages and the International Phonetic Alphabet, the vertical bar is used to write the dental click (ǀ). Vertical bar_sentence_41

A double vertical bar is used to write the alveolar lateral click (ǁ). Vertical bar_sentence_42

Since these are technically letters, they have their own Unicode code points in the Latin Extended-B range: U+01C0 for the single bar and U+01C1 for the double bar. Vertical bar_sentence_43

Some Northwest and Northeast Caucasian languages written in the Cyrillic script have a vertical bar called palochka (Russian: палочка, lit. Vertical bar_sentence_44

'little stick'), indicating the preceding consonant is an ejective. Vertical bar_sentence_45

Longer single and double vertical bars are used to mark prosodic boundaries in the IPA. Vertical bar_sentence_46

Literature Vertical bar_section_14

Punctuation Vertical bar_section_15

In medieval European manuscripts, a single vertical bar was a common variant of the virgula/⟩ used as a period, scratch comma, and caesura mark. Vertical bar_sentence_47

In Sanskrit and other Indian languages, a single vertical mark, a danda, has a similar function as a period (full stop). Vertical bar_sentence_48

Two bars || (a 'double danda') is the equivalent of a pilcrow in marking the end of a stanza, paragraph or section. Vertical bar_sentence_49

The danda has its own Unicode code point, U+0964. Vertical bar_sentence_50

Poetry Vertical bar_section_16

A double vertical bar ⟨||⟩ or ⟨ǁ⟩ is the standard caesura mark in English literary criticism and analysis. Vertical bar_sentence_51

It marks the strong break or caesura common to many forms of poetry, particularly Old English verse. Vertical bar_sentence_52

Notation Vertical bar_section_17

In the Geneva Bible and early printings of the King James Version, a double vertical bar is used to mark margin notes that contain an alternative translation from the original text. Vertical bar_sentence_53

These margin notes always begin with the conjunction "Or". Vertical bar_sentence_54

In later printings of the King James Version, the double vertical bar is irregularly used to mark any comment in the margins. Vertical bar_sentence_55

Music scoring Vertical bar_section_18

Main article: Sheet music Vertical bar_sentence_56

In music, when writing chord sheets, single vertical bars associated with a colon (|: A / / / :|) represents the beginning and end of a section (ie. Vertical bar_sentence_57

Intro, Interlude, Verse, Chorus) of music. Vertical bar_sentence_58

Single bars can also represent the beginning and end of measures (|: A / / / | D / / / | E / / / :|). Vertical bar_sentence_59

A double vertical bar associated with a colon can represent the repeat of a given section (||: A / / / :|| - play twice). Vertical bar_sentence_60

Encoding Vertical bar_section_19

Solid vertical bar vs broken bar Vertical bar_section_20

Many early video terminals and dot-matrix printers rendered the vertical bar character as the allograph broken bar ¦. Vertical bar_sentence_61

This may have been to distinguish the character from the lower-case 'L' and the upper-case 'I' on these limited-resolution devices, and to make a vertical line of them look more like a horizontal line of dashes. Vertical bar_sentence_62

It was also (briefly) part of the ASCII standard. Vertical bar_sentence_63

An initial draft for a 7-bit character set that was published by the X3.2 subcommittee for Coded Character Sets and Data Format on June 8, 1961, was the first to include the vertical bar in a standard set. Vertical bar_sentence_64

The bar was intended to be used as the representation for the logical OR symbol. Vertical bar_sentence_65

A subsequent draft on May 12, 1966, places the vertical bar in column 7 alongside regional entry codepoints, and formed the basis for the original draft proposal used by the International Standards Organisation. Vertical bar_sentence_66

This draft received opposition from an IBM user group known as SHARE, with its chairman, H. W. Nelson, writing a letter to the American Standards Association titled "The Proposed revised American Standard Code for Information Interchange does NOT meet the needs of computer programmers! Vertical bar_sentence_67

"; in this letter, he argues that no characters within the international subset designated at columns 2-5 of the character set would be able to adequately represent logical OR and logical NOT in languages such as IBM's PL/I universally on all platforms. Vertical bar_sentence_68

As a compromise, a requirement was introduced where the exclamation mark (!) Vertical bar_sentence_69

and circumflex (^) would display as logical OR (|) and logical NOT (¬) respectively in use cases such as programming, while outside of these use cases they would represent their original typographic symbols: Vertical bar_sentence_70

The original vertical bar encoded at 0x7C in the original May 12, 1966 draft was then broken as ¦, so it could not be confused with the unbroken logical OR. Vertical bar_sentence_71

In the 1967 revision of ASCII, along with the equivalent ISO 464 code published the same year, the code point was defined to be a broken vertical bar, and the exclamation mark character was allowed to be rendered as a solid vertical bar. Vertical bar_sentence_72

However, the 1977 revision (ANSI X.3-1977) undid the changes made in the 1967 revision, enforcing that the circumflex could no longer be stylised as a logical NOT symbol, the exclamation mark likewise no longer allowing stylisation as a vertical bar, and defining the code point originally set to the broken bar as a solid vertical bar instead; the same changes were also reverted in ISO 646-1973 published four years prior. Vertical bar_sentence_73

Some variants of EBCDIC included both versions of the character as different code points. Vertical bar_sentence_74

The broad implementation of the extended ASCII ISO/IEC 8859 series in the 1990s also made a distinction between the two forms. Vertical bar_sentence_75

This was preserved in Unicode as a separate character at U+00A6 BROKEN BAR (the term "parted rule" is used sometimes in Unicode documentation). Vertical bar_sentence_76

Some fonts draw the characters the same (both are solid vertical bars, or both are broken vertical bars). Vertical bar_sentence_77

The broken bar does not appear to have any clearly identified uses distinct from those of the vertical bar. Vertical bar_sentence_78

In non-computing use — for example in mathematics, physics and general typography — the broken bar is not an acceptable substitute for the vertical bar. Vertical bar_sentence_79

Many keyboards with US or US-International layout display the broken bar on a keycap even though the solid vertical bar character is produced in modern operating systems. Vertical bar_sentence_80

This includes many German QWERTZ keyboards. Vertical bar_sentence_81

This is a legacy of keyboards manufactured during the 1980s and 1990s for IBM PC compatible computers featuring the broken bar, as such computers used IBM's 8-bit Code page 437 character set based on ASCII, which continued to display the glyph for the broken bar at codepoint 7C on displays from MDA (1981) to VGA (1987) despite the changes made to ASCII in 1977. Vertical bar_sentence_82

The broken bar character can be typed (depending on the layout) as AltGr+` or AltGr+6 or AltGr+⇧ Shift+Right \ on Windows and Compose!^ on Linux. Vertical bar_sentence_83

It can be inserted into HTML as ¦ Vertical bar_sentence_84

Unicode code points Vertical bar_section_21

These glyphs are encoded in Unicode as follows: Vertical bar_sentence_85

Code pages and other historical encodings Vertical bar_section_22

See also Vertical bar_section_23

Vertical bar_unordered_list_0

Credits to the contents of this page go to the authors of the corresponding Wikipedia page: bar.