_ ⎁ ◌̲ | |
---|---|
Underscore | |
In Unicode | U+005F _ LOW LINE (HTML _ · _, _ )U+2381 ⎁ CONTINUOUS UNDERLINE SYMBOL U+0332 ̲ COMBINING LOW LINE |
Related | |
See also | U+2017 ‗ DOUBLE LOW LINE U+2382 ⎂ DISCONTINUOUS UNDERLINE SYMBOL |
Different from | |
Different from | U+0331 ◌̱ COMBINING MACRON BELOW |
An underscore, also called an underline, low line, or low dash, is a line drawn under a segment of text. Underscoring/underlining is a proofreading convention that says "set this text in italic type", traditionally used on manuscript or typescript as an instruction to the printer. (Its use to add emphasis in modern documents is a deprecated practice.[1]) The underscore character, _, originally appeared on the typewriter and was primarily used to emphasise words as in the proofreader's convention. To produce an underscored word, the word was typed, the typewriter carriage was moved back to the beginning of the word, and the word was overtyped with the underscore character.
In modern usage, underscoring is achieved by markup or with combining characters. The original free-standing underscore character continues in use to create visual spacing within a sequence of characters, where a whitespace character is not permitted (e.g., in computer filenames, email addresses, and in Internet URLs). In contexts where no formatting is supported such as in instant messaging, or older email formats, the 'enclosing underscores' markup is sometimes used as a proxy for underlining the word(s) enclosed (_thus_
).
In some languages, the mark is used as combining diacritic and is called a "combining low line".
The underscore is used as a diacritic mark, "combining low line", ◌̲ , in some languages of Egypt, some languages using the Rapidolangue orthography in Gabon, Izere in Nigeria, and indigenous languages of the Americas such as Shoshoni and Kiowa.
The combining diacritic, ◌̱, (Macron below) is similar to the combining low line but its mark is shorter. The difference between "macron below" and "low line" is that the latter results in an unbroken underline when it is run together: compare a̱ḇc̱ and a̲b̲c̲ (only the latter should look like abc).[2]
In printed documents underlining is generally avoided, with italics or small caps often used instead, or (especially in headings) using capitalization, bold type or greater body height (font size).[1] In a manuscript to be typeset, various forms of underlining (see below) were therefore conventionally used to indicate that text should be set in special type such as italics, part of a procedure known as markup.
A series of underscores (like __________ ) may be used to create a blank to be filled in by hand on a paper form. It is also sometimes used to create a horizontal line; other symbols with similar graphemes, such as hyphens and dashes, are also used for this purpose.
In web browsers, default settings typically distinguish hyperlinks by underlining them (and usually changing their color), but both users and websites can change the settings to make some or all hyperlinks appear differently (or even without distinction from normal text).
As early output devices (Teleprinters, CRTs and line printers) could not produce more than one character at a location, it was not possible to underscore text, so early encodings such as ITA2 and the first versions of ASCII had no underscore. IBM's EBCDIC character-coding system, introduced in 1964, added the underscore, which IBM referred to as the "break character". IBM's report on NPL (the early name of what is now called PL/I) leaves the character set undefined, but specifically mentions the break character, and gives RATE_OF_PAY
as an example identifier.[3] By 1967 the underscore had spread to ASCII,[4] replacing the similarly shaped left-arrow character, ← (see also: PIP). C, developed at Bell Labs in the early 1970s, allowed the underscore in identifiers.[5]
Underscore predates the existence of lower-case letters in many systems, so often it had to be used to make multi-word identifiers, since CamelCase (see below) was not available.
Underscores inserted between letters are very common to make a "multi word" identifier in languages that cannot handle spaces in identifiers. This convention is known as "snake case" (the other popular method is called camelCase, where capital letters are used to show where the words start).
An underscore as the first character in an ID is often used to indicate an internal implementation that is not considered part of the API and should not be called by code outside that implementation. Python uses this to indicate protected member variables of classes and a double underscore to indicate private variables. In Dart, all private properties of classes must start with an underscore; this usage is also common in other languages such as C++ even though those provide keywords to indicate that members are private. It is extensively used to hide variables and functions used for implementations in header files. In fact, the use of single underscore for this became so common that C compilers had to standardize on a double leading underscore (for instance __DATE__
) for actual built-in variables to avoid conflicts with the ones in header files. Python uses double underscore to "mangle" a private id to make it much harder to refer to it, and "PHP reserves all function names starting with __ as magical."[6]
A variable named with just an underscore often has special meaning. $_
or _
is the previous command or result in many interactive shells, such as those of Python, Ruby, and Perl. In Perl, @_
is a special array variable that holds the arguments to a function. In Clojure, it indicates an argument whose value will be ignored.[7]
In some languages with pattern matching, such as Prolog, Standard ML, Scala, OCaml, Haskell, Erlang, and the Wolfram Language, the pattern _
matches any value, but does not perform binding.
HTML has a presentational element <u>
that was originally used to underline text; this usage was deprecated in HTML4 in favor of the CSS style {text-decoration: underline}
.[8] In HTML5, the tag reappeared but its meaning was changed significantly: it now "represents a span of inline text which should be rendered in a way that indicates that it has a non-textual annotation".[8] This facility is intended for example to provide a red wavy line underline to flag spelling errors at input time but which are not to be embedded in any stored file (unlike an emphasis mark, which would be),
The elements may also exist in other markup languages, such as MediaWiki. The Text Encoding Initiative (TEI) provides an extensive selection of related elements for marking editorial activity (insertion, deletion, correction, addition, etc.).
Unicode has a free-standing underscore _ at U+005F, which is a legacy of the typewriter practice of underlining using backspace and overtype. Modern practice uses the combining diacritic "combining low line" at U+0332 ◌̲ that results in an underline when run together: u̲n̲d̲e̲r̲l̲i̲n̲e̲. Unicode also has the combining macron below, a single letter diacritic.[2]
In Canadian French, it is correct orthography to underline the masculine and feminine ordinal indicators and standard keyboards are engraved accordingly:[9] a symbol, an underlined 'letter a with ellipsis' (U+2381 ⎁ CONTINUOUS UNDERLINE SYMBOL), is available to document this use.[citation needed][a]
In plain-text applications, including plain-text e-mails, where emphasis markup is not possible, the desired emphasis is often indicated by surrounding words with underscore characters. For example, "You must use an _emulsion_ paint on the ceiling".
Some applications will automatically add emphasis to text manually bracketed by underscores, either by underlining or by italicizing it (e.g. _string_
may render string or string).
Underline (typically red or wavy or both) is often used by spell checkers (and grammar checkers) to denote misspelled or otherwise incorrect text.
Depending on local conventions, the following kinds of underlines may be used inline on manuscripts to indicate the special typefaces to be used:[10][11]
In Chinese, the underline is a punctuation mark for proper names (simplified Chinese: 专名号; traditional Chinese: 專名號; pinyin: zhuānmínghào; literally "proper name mark", used for personal and geographic names).[citation needed] Its meaning is somewhat akin to capitalization in English and should never be used for emphasis even if the influence of English computing makes the latter sometimes occur. A wavy underline (simplified Chinese: 书名号; traditional Chinese: 書名號; pinyin: shūmínghào; literally, "book title mark") serves a similar function, but marks names of literary works instead of proper names.
In the case of two or more adjacent proper names, each individual proper name is separately underlined so there should be a slight gap between the underlining of each proper name.
Spacing Overscores and Underscores. U+203E OVERLINE is the above-the-line counterpart to U+005F low line. It is a spacing character, not to be confused with U+0305 COMBINING OVERLINE. As with all overscores and underscores, a sequence of these characters should connect in an unbroken line. The overscoring characters also must be distinguished from U+0304 COMBINING MACRON, which does not connect horizontally in this way.
|journal=
(help)
|journal=
(help)
"Ngram Viewer: comparison of usage of 'underscore' and 'underline'". books.google.com. Retrieved 9 October 2020.
By: Wikipedia.org
Edited: 2021-06-18 19:25:47
Source: Wikipedia.org