Colon (punctuation)
Template:Short description Template:About Template:Infobox punctuation mark
The colon, Template:Char, is a punctuation mark consisting of two equally sized dots aligned vertically. A colon often precedes an explanation, a list,<ref name=PunctuationGuide>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> or a quoted sentence.<ref>Template:Cite book</ref> It is also used between hours and minutes in time,<ref name="PunctuationGuide"/> between certain elements in medical journal citations,<ref>Template:Citation</ref> between chapter and verse in Bible citations,<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> between two numbers in a ratio, and, in the US, for salutations in business letters and other formal letters.<ref name="PunctuationGuide"/>
HistoryEdit
Template:Further In Ancient Greek, in rhetoric and prosody, the term Template:Wikt-lang (Template:Transliteration, Template:Literal translation 'limb, member of a body') did not refer to punctuation, but to a member or section of a complete thought or passage; see also Colon (rhetoric). From this usage, in palaeography, a colon is a clause or group of clauses written as a line in a manuscript.<ref name=oed>Oxford English Dictionary, 1st ed. "colon, n.2" Oxford University Press (Oxford), 1891.</ref>
In the 3rd century BC, Aristophanes of Byzantium is alleged to have devised a punctuation system, in which the end of such a Template:Transliteration was thought to occasion a medium-length breath, and was marked by a middot Template:Char. In practice, evidence is scarce for its early usage, but it was revived later as the ano teleia, the modern Greek semicolon.<ref name=nicky>Nicolas, Nick. "Greek Unicode Issues: Punctuation Template:Webarchive". 2005. Accessed 7 October 2014.</ref> Some writers also used a double dot symbol Template:Char, that later came to be used as a full stop or to mark a change of speaker. (See also Punctuation in Ancient Greek.)
In 1589, in The Arte of English Poesie, the English term colon and the corresponding punctuation mark Template:Char is attested:<ref name=arber>Template:Cite book</ref>Template:Efn
<templatestyles src="Template:Blockquote/styles.css" />
For these respectes the auncient reformers of language, inuented, three maner of pauses [...] The shortest pause or intermission they called comma [...] The second they called colon, not a peece but as it were a member for his larger length, because it occupied twise as much time as the comma. The third they called periodus, [...]{{#if:|{{#if:|}}
— {{#if:|, in }}Template:Comma separated entries}}
{{#invoke:Check for unknown parameters|check|unknown=Template:Main other|preview=Page using Template:Blockquote with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | 3 | 4 | 5 | author | by | char | character | cite | class | content | multiline | personquoted | publication | quote | quotesource | quotetext | sign | source | style | text | title | ts }}
In 1622, in Nicholas Okes' print of William Shakespeare's Othello, the typographical construction of a colon followed by a hyphen or dash to indicate a restful pause is attested.<ref>Template:Cite book</ref> This construction, known as the dog's bollocks, was once common in British English, though this usage is now discouraged.<ref name=dean>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref name=martens>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref name=sussex>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
As late as the 18th century, John Mason related the appropriateness of a colon to the length of the pause taken when reading the text aloud, but silent reading eventually replaced this with other considerations.<ref>John Mason's work, An Essay on Elocution (1748), notes that "A Comma Stops the Voice while we may privately tell one, a Semi Colon two; a Colon three: and a Period four."</ref>
Usage in EnglishEdit
In modern English usage, a complete sentence precedes a colon, while a list, description, explanation, or definition follows it. The elements which follow the colon may or may not be a complete sentence: since the colon is preceded by a sentence, it is a complete sentence whether what follows the colon is another sentence or not. While it is acceptable to capitalise the first letter after the colon in American English, it is not the case in British English, except where a proper noun immediately follows a colon.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
- Colon used before list
- Daequan was so hungry that he ate everything in the house: chips, cold pizza, pretzels and dip, hot dogs, peanut butter, and candy.
- Colon used before a description
- Bertha is so desperate that she'll date anyone, even William: he's uglier than a squashed toad on the highway, and that's on his good days.
- Colon before definition
- For years while I was reading Shakespeare's Othello and criticism on it, I had to constantly look up the word "egregious" since the villain uses that word: outstandingly bad or shocking.
- Colon before explanation
- I guess I can say I had a rough weekend: I had chest pain and spent all Saturday and Sunday in the emergency room.
Some writers use fragments (incomplete sentences) before a colon for emphasis or stylistic preferences (to show a character's voice in literature), as in this example:
- Dinner: chips and juice. What a well-rounded diet I have.
The Bedford Handbook describes several uses of a colon. For example, one can use a colon after an independent clause to direct attention to a list, an appositive, or a quotation, and it can be used between independent clauses if the second summarizes or explains the first. In non-literary or non-expository uses, one may use a colon after the salutation in a formal letter, to indicate hours and minutes, to show proportions, between a title and subtitle, and between city and publisher in bibliographic entries.<ref>Template:Cite book</ref>
Luca Serianni, an Italian scholar who helped to define and develop the colon as a punctuation mark, identified four punctuational modes for it: syntactical-deductive, syntactical-descriptive, appositive, and segmental.<ref>Template:Cite book</ref>
Syntactical-deductiveEdit
The colon introduces the logical consequence, or effect, of a fact stated before.
- There was only one possible explanation: the train had never arrived.
Syntactical-descriptiveEdit
In this sense the colon introduces a description; in particular, it makes explicit the elements of a set.
- I have three sisters: Daphne, Rose, and Suzanne.
Syntactical-descriptive colons may separate the numbers indicating hours, minutes, and seconds in abbreviated measures of time.<ref name="ISO8601">Template:Cite ISO standard</ref>
- The concert begins at 21:45.
- The rocket launched at 09:15:05.
British English and Australian English, however, more frequently use a point for this purpose:
- The programme will begin at 8.00 pm.
- You will need to arrive by 14.30.<ref name="trask">{{#invoke:citation/CS1|citation
|CitationClass=web }}</ref><ref>Template:Cite book</ref>
A colon is also used in the descriptive location of a book verse if the book is divided into verses, such as in the Bible or the Quran:
- "Isaiah 42:8"
- "Deuteronomy 32:39"
- "Quran 10:5"
AppositiveEdit
- Luruns could not speak: he was drunk.<ref>Example quoted in An Educational Companion to Eats, Shoots & Leaves by Lynne Truss</ref>
An appositive colon also separates the subtitle of a work from its principal title. (In effect, the example given above illustrates an appositive use of the colon as an abbreviation for the conjunction "because".) Dillon has noted the impact of colons on scholarly articles,<ref>Template:Cite journal</ref><ref>Template:Cite journal</ref> but the reliability of colons as a predictor of quality or impact has also been challenged.<ref>Template:Cite journal</ref><ref>Template:Cite journal</ref> In titles, neither needs to be a complete sentence as titles do not represent expository writing:
- Star Wars Episode VI: Return of the Jedi
SegmentalEdit
Like a dash or quotation mark, a segmental colon introduces speech. The segmental function was once a common means of indicating an unmarked quotation on the same line. The following example is from the grammar book The King's English:
- Benjamin Franklin proclaimed the virtue of frugality: A penny saved is a penny earned.
This form is still used in British industry-standard templates for written performance dialogues, such as in a play.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> The colon indicates that the words following an character's name are spoken by that character.
- Patient: Doctor, I feel like a pair of curtains.
- Doctor: Pull yourself together!
The uniform visual pattern of <character_nametag : character_spoken_lines>
placement on a script page assists an actor in scanning for the lines of their assigned character during rehearsal, especially if a script is undergoing rewrites between rehearsals.
Use of capitalsEdit
Use of capitalization or lower-case after a colon varies. In British English, and in most Commonwealth countries, the word following the colon is in lower case unless it is normally capitalized for some other reason, as with proper nouns and acronyms. British English also capitalizes a new sentence introduced by a colon's segmental use.Template:Citation needed
American English permits writers to similarly capitalize the first word of any independent clause following a colon. This follows the guidelines of some modern American style guides, including those published by the Associated Press and the Modern Language Association. The Chicago Manual of Style, however, requires capitalization only when the colon introduces a direct quotation, a direct question, or two or more complete sentences.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>Template:Failed verification
In many European languages, the colon is usually followed by a lower-case letter unless the upper case is required for other reasons, as with British English. German usage requires capitalization of independent clauses following a colon.<ref>Duden Newsletter vom 24.08.2001</ref> Dutch further capitalizes the first word of any quotation following a colon, even if it is not a complete sentence on its own.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
Spacing and parenthesesEdit
Template:See also In print, a thin space was traditionally placed before a colon and a thick space after it. In modern English-language printing, no space is placed before a colon and a single space is placed after it.<ref>Template:Cite book</ref><ref>Template:Cite book</ref> In French-language typing and printing, the traditional rules are preserved.
One or two spaces may be and have been used after a colon. The older convention (designed to be used by monospaced fonts) was to use two spaces after a colon.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
In modern typography, a colon will be placed outside the closing parenthesis introducing a list. In very early English typography, it could be placed inside, as seen in Roger Williams' 1643 book about the Native American languages of New England.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
Usage in other languagesEdit
Suffix separatorEdit
In Finnish and Swedish, the colon can appear inside words in a manner similar to the apostrophe in the English possessive case, connecting a grammatical suffix to an abbreviation or initialism, a special symbol, or a digit (e.g., Finnish USA:n and Swedish USA:s for the genitive case of "USA", Finnish %:ssa for the inessive case of "%", or Finnish 20:een for the illative case of "20").
Abbreviation markEdit
Written Swedish uses colons in contractions, such as S:t for Sankt (Swedish for "Saint") – for example in the name of the Stockholm metro station S:t Eriksplan, and k:a for kyrka ("church") – for instance Svenska k:a (Svenska kyrkan), the Evangelical Lutheran national Church of Sweden. This can even occur in people's names, for example Antonia Ax:son Johnson (Ax:son for Axelson). Early Modern English texts also used colons to mark abbreviations.<ref>Template:Cite book</ref><ref>Compare: Template:Cite book</ref>
Word separatorEdit
In Ethiopia, both Amharic and Ge'ez script used and sometimes still use a colon-like mark as word separator.
Historically, a colon-like mark was used as a word separator in Old Turkic script.
End of sentence or verseEdit
In Armenian, a colon indicates the end of a sentence, similar to a Latin full stop or period.
In liturgical Hebrew, the sof pasuq is used in some writings such as prayer books to signal the end of a verse.
Score dividerEdit
In German, Hebrew, and sometimes in English, a colon divides the scores of opponents in sports and games. A result of 149–0 would be written as 149 : 0 in German and in Hebrew.
Mathematics and logicEdit
Template:Multiple issues The colon is used in mathematics, cartography, model building, and other fields, in this context it denotes a ratio or a scale, as in 3:1 (pronounced "three to one").<ref name="PunctuationGuide"/>
When a ratio is reduced to a simpler form, such as 10:15 to 2:3, this may be expressed with a double colon as 10:15::2:3; this would be read "10 is to 15 as 2 is to 3". This form is also used in tests of logic where the question of "Dog is to Puppy as Cat is to _____?" can be expressed as "Dog:Puppy::Cat:_____". For these uses, there is a dedicated Unicode symbol (Template:Unichar) that is preferred in some contexts. Compare Template:Not a typo (ratio colon) with 2:3 (U+003A ASCII colon).
In some languages (e.g. German, Russian, and French), the colon is the commonly used sign for division (instead of ÷). Template:Crossreference
The notation |Template:Mvar : Template:Mvar| may also denote the index of a subgroup.
The notation Template:Math indicates that Template:Mvar is a function with domain Template:Mvar and codomain Template:Mvar.
The combination with an equal sign (Template:Math) is used for definitions.
In mathematical logic, when using set-builder notation for describing the characterizing property of a set, it is used as an alternative to a vertical bar (which is the ISO 31-11 standard), to mean "such that". Example:
- <math>S = \{x \in \mathbb{R} : 1 < x < 3 \}</math> (S is the set of all Template:Mvar in <math>\mathbb{R}</math> (the real numbers) such that Template:Mvar is strictly greater than 1 and strictly smaller than 3)
In older literature on mathematical logic, it is used to indicate how expressions should be bracketed (see Glossary of Principia Mathematica).
In type theory and programming language theory, the colon sign after a term is used to indicate its type, sometimes as a replacement to the "∈" symbol. Example:
- <math>\lambda x . x \mathrel{:} A \to A </math>.
A colon is also sometimes used to indicate a tensor contraction involving two indices, and a double colon (::) for a contraction over four indices.
A colon is also used to denote a parallel sum operation involving two operands (many authors, however, instead use a ∥ sign and a few even a ∗ for this purpose).
ComputingEdit
The character was on early typewriters and therefore appeared in most text encodings, such as Baudot code and EBCDIC. It was placed at code 58 in ASCII and from there inherited into Unicode. Unicode also defines several related characters:
- Template:Unichar
- Template:Unichar, used in IPA.<ref>{{#invoke:citation/CS1|citation
|CitationClass=web }}</ref>
- Template:Unichar, IPA modifier-letter.<ref name="L220252">{{#invoke:citation/CS1|citation
|CitationClass=web }}</ref>
- Template:Unichar, used in IPA.
- Template:Unichar, IPA modifier-letter.<ref name="L220252"/>
- Template:Unichar, used by Uralic Phonetic Alphabet.<ref>{{#invoke:citation/CS1|citation
|CitationClass=web }}</ref>
- Template:Unichar, compatible with right-to-left text.
- Template:Unichar, for mathematical usage.
- Template:Unichar, for use in pretty-printing programming languages.
- Template:Unichar<ref>{{#invoke:citation/CS1|citation
|CitationClass=web }}</ref>
- Template:Unichar
- Template:Unichar
- Template:Unichar
- Template:Unichar
- Template:Unichar
- Template:Unichar, see Colon (letter). (This character is also sometimes used in Windows filenames as it is identical to the colon in the Segoe UI font used for filenames. The colon itself is not permitted as it is a reserved character.)
- Template:Unichar, compatibility character for the Chinese Standard GB 18030.
- Template:Unichar, for compatibility with halfwidth and fullwidth fonts.
- Template:Unichar, compatibility character for the Chinese National Standard CNS 11643.
Programming languagesEdit
Many programming languages, most notably ALGOL, Pascal and Ada, use a colon and equals sign <syntaxhighlight lang="text" class="" style="" inline="1">:=</syntaxhighlight> as the assignment operator, to distinguish it from a single equals <syntaxhighlight lang="text" class="" style="" inline="1">=</syntaxhighlight> which is an equality test (C instead uses a single equals as assignment, and a double equals <syntaxhighlight lang="text" class="" style="" inline="1">==</syntaxhighlight> as the equality test).<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
Many languages including C and Java use the colon to indicate the text before it is a label, such as a target for a goto or an introduction to a case in a switch statement.<ref name='c99'>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>Template:Rp<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> In a related use, Python uses a colon to separate a control statement (the clause header) from the block of statements it controls (the suite):<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
<syntaxhighlight lang="python"> if test(x):
print("test(x) is true!")
else:
print("test(x) is not true...")
</syntaxhighlight>
In many languages, including JavaScript, colons are used to define name–value pairs in a dictionary or object.<ref>Template:Cite book</ref>Template:Rp This is also used by data formats such as JSON.Template:Ref RFC Some other languages use an equals sign.
<syntaxhighlight lang="javascript"> var obj = {
name: "Charles", age: 18,
} </syntaxhighlight>
The colon is used as part of the ?: conditional operator in C and many other languages.<ref name='c99'/>Template:Rp
C++ uses a double colon as the scope resolution operator, and class member access.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Most other languages use a period but C++ had to use this for compatibility with C. Another language using colons for scope resolution is Erlang, which uses a single colon.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
In BASIC, it is used as a separator between the statements or instructions in a single line. Most other languages use a semicolon, but BASIC had used semicolon to separate items in print statements.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
In Forth, a colon precedes definition of a new word.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
Haskell uses a colon (pronounced as "cons", short for "construct") as an operator to add a data element to the front of a list:<ref>Template:Cite book</ref>
<syntaxhighlight lang="haskell">"child" : ["woman", "man"] -- equals ["child","woman","man"]</syntaxhighlight>
while a double colon ::
is read as "has type of" (compare scope resolution operator):<ref>Template:Cite book</ref>
<syntaxhighlight lang="haskell">("text", False) :: ([Char], Bool)</syntaxhighlight>
The ML languages (such as Standard ML) have the above reversed, where the double colon (::
) is used to add an element to the front of a list; and the single colon (:
) is used for type guards.<ref>Template:Cite book</ref>Template:Rp
MATLAB uses the colon as a binary operator to generate a vector, or to select a part of an extant matrix.
APL uses the colon:
- to introduce a control structure element. In this usage it must be the first non-blank character of the line.<ref name="DyalogAPL">{{#invoke:citation/CS1|citation
|CitationClass=web }}</ref>Template:Rp
- after a label name that will be the target of a
:goto
or a right-pointing arrow (this style of programming is deprecated and programs are supposed to use control structures instead).<ref name="DyalogAPL"/>Template:Rp - to separate a guard (Boolean expression) from its expression in a dynamic function.<ref name="DyalogAPL"/>Template:Rp Two colons are used for an Error guard (one or more error numbers).<ref name="DyalogAPL"/>Template:Rp
- Colon + space are used in class definitions to indicate inheritance.<ref name="DyalogAPL"/>Template:Rp
- ⍠ (a colon in a box) is used by APL for its variant operator.<ref name="DyalogAPL"/>Template:Rp
The colon is also used in many operating systems commands.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
In the esoteric programming language INTERCAL, the colon is called two-spot and used to label a 32-bit variable, distinct from spot (.) to label a 16-bit variable.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>Template:Rp
AddressesEdit
Internet URLs use the colon to separate the protocol (such as <syntaxhighlight lang="text" class="" style="" inline="1">http:</syntaxhighlight>) from the hostname or IP address.Template:Ref RFC
In an IPv6 address, colons (and one optional double colon) separate up to 8 groups of 16 bits in hexadecimal representation.Template:Ref RFC In a URL, a colon follows the initial scheme name (such as Hypertext Transfer Protocol (HTTP) and File Transfer Protocol (FTP), and separates a port number from the hostname or IP address.Template:Ref RFC
In Microsoft Windows filenames, the colon is reserved for use in alternate data streams and cannot appear in a filename.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> It was used as the directory separator in Classic Mac OS, and was difficult to use in early versions of the newer BSD-based macOS due to code swapping the slash and colon to try to preserve this usage. In most systems it is often difficult to put a colon in a filename as the shell interprets it for other purposes.
CP/M and early versions of MSDOS required the colon after the names of devices, such as <syntaxhighlight lang="text" class="" style="" inline="1">CON:</syntaxhighlight> though this gradually disappeared except for disks (where it had to be between the disk name and the required path representation of the file as in C:\Windows\
). This then migrated to use in URLs.Template:Ref RFC
Text markupEdit
{{ safesubst:#invoke:Unsubst||date=__DATE__ |$B= {{ safesubst:#invoke:Unsubst||date=__DATE__ |$B= Template:Ambox }} }}
It is often used as a single post-fix delimiter, signifying a token keyword had immediately preceded it or the transition from one mode of character string interpretation to another related mode. Some applications, such as the widely used MediaWiki, utilize the colon as both a pre-fix and post-fix delimiter.
In wiki markup, the colon is often used to indent text. Common usage includes separating or marking comments in a discussion as replies, or to distinguish certain parts of a text. Template:Markup
In human-readable text messages, a colon, or multiple colons, is sometimes used to denote an action (similar to how asterisks are used)Template:Original research inline or to emote (for example, in vBulletin). In the action denotation usage it has the inverse function of quotation marks, denoting actions where unmarked text is assumed to be dialogue. For example:
- Tom: Pluto is so small; it should not be considered a planet. It is tiny!
- Mark: Oh really? ::drops Pluto on Tom's head:: Still think it's small now?
Colons may also be used for sounds, e.g., ::click::, though sounds can also be denoted by asterisks or other punctuation marks.
Colons can also be used to represent eyes in emoticons.
See alsoEdit
NotesEdit
ReferencesEdit
External linksEdit
- {{#invoke:citation/CS1|citation
|CitationClass=web }}
- Walden University Guides Punctuation: Colons