HOME

TheInfoList



OR:

The colon, , is a
punctuation Punctuation marks are marks indicating how a piece of writing, written text should be read (silently or aloud) and, consequently, understood. The oldest known examples of punctuation marks were found in the Mesha Stele from the 9th century BC, c ...
mark consisting of two equally sized dots aligned vertically. A colon often precedes an explanation, a list, or a quoted sentence. It is also used between hours and minutes in time, between certain elements in
medical journal A medical journal is a peer-reviewed scientific journal that communicates medical information to physicians, other health professionals. Journals that cover many medical specialties are sometimes called general medical journals. History The first ...
citations, between chapter and verse in Bible citations, between two numbers in a
ratio In mathematics, a ratio () shows how many times one number contains another. For example, if there are eight oranges and six lemons in a bowl of fruit, then the ratio of oranges to lemons is eight to six (that is, 8:6, which is equivalent to the ...
, and, in the US, for
salutation A salutation is a greeting used in a Letter (message), letter or other communication. Salutations can be formal or informal. The most common form of salutation in an English letter includes the recipient's given name or title. For each style of ...
s in business letters and other formal letters.


History

In
Ancient Greek Ancient Greek (, ; ) includes the forms of the Greek language used in ancient Greece and the classical antiquity, ancient world from around 1500 BC to 300 BC. It is often roughly divided into the following periods: Mycenaean Greek (), Greek ...
, in
rhetoric Rhetoric is the art of persuasion. It is one of the three ancient arts of discourse ( trivium) along with grammar and logic/ dialectic. As an academic discipline within the humanities, rhetoric aims to study the techniques that speakers or w ...
and prosody, the term (', '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) A colon (from Greek: , ''pl.'' , ''cola''.) can be defined as a single unit of poetry. In textual criticism, a colon is a line consisting of a single clause. The term is most often used in the study of Hebrew poetry to refer to the fundamental uni ...
''. From this usage, in
palaeography Palaeography (American and British English spelling differences#ae and oe, UK) or paleography (American and British English spelling differences#ae and oe, US) (ultimately from , , 'old', and , , 'to write') is the study and academic disciplin ...
, a colon is a clause or group of clauses written as a line in a
manuscript A manuscript (abbreviated MS for singular and MSS for plural) was, traditionally, any document written by hand or typewritten, as opposed to mechanically printed or reproduced in some indirect or automated way. More recently, the term has ...
.''Oxford English Dictionary'', 1st ed. "colon, ''n.2''" Oxford University Press (Oxford), 1891. In the 3rd century BC,
Aristophanes of Byzantium __NOTOC__ Aristophanes of Byzantium ( ; Byzantium – Alexandria BC) was a Hellenistic Greek scholar, critic and grammarian, particularly renowned for his work in Homeric scholarship, but also for work on other classical authors such as ...
is alleged to have devised a punctuation system, in which the end of such a was thought to occasion a medium-length breath, and was marked by a middot . In practice, evidence is scarce for its early usage, but it was revived later as the ''
ano teleia An interpunct , also known as an interpoint, middle dot, middot, centered dot or centred dot, is a punctuation mark consisting of a vertically centered dot used for interword separation in Classical Latin. (space (punctuation), Word-separating ...
'', the
modern Greek Modern Greek (, or , ), generally referred to by speakers simply as Greek (, ), refers collectively to the dialects of the Greek language spoken in the modern era, including the official standardized form of the language sometimes referred to ...
semicolon The semicolon (or semi-colon) is a symbol commonly used as orthographic punctuation. In the English language, a semicolon is most commonly used to link (in a single sentence) two independent clauses that are closely related in thought, such as ...
.Nicolas, Nick.
Greek Unicode Issues: Punctuation
". 2005. Accessed 7 October 2014.
Some writers also used a double dot symbol , that later came to be used as a
full stop The full stop ( Commonwealth English), period (North American English), or full point is a punctuation mark used for several purposes, most often to mark the end of a declarative sentence (as distinguished from a question or exclamation). A ...
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 is attested: In 1622, in Nicholas Okes' print of
William Shakespeare William Shakespeare ( 23 April 1564 – 23 April 1616) was an English playwright, poet and actor. He is widely regarded as the greatest writer in the English language and the world's pre-eminent dramatist. He is often called England's nation ...
's ''
Othello ''The Tragedy of Othello, the Moor of Venice'', often shortened to ''Othello'' (), is a tragedy written by William Shakespeare around 1603. Set in Venice and Cyprus, the play depicts the Moorish military commander Othello as he is manipulat ...
'', the typographical construction of a colon followed by a
hyphen The hyphen is a punctuation mark used to join words and to separate syllables of a single word. The use of hyphens is called hyphenation. The hyphen is sometimes confused with dashes (en dash , em dash and others), which are wider, or with t ...
or
dash The dash is a punctuation mark consisting of a long horizontal line. It is similar in appearance to the hyphen but is longer and sometimes higher from the baseline. The most common versions are the endash , generally longer than the hyphen ...
to indicate a restful pause is attested. This construction, known as the '' dog's bollocks'', was once common in
British English British English is the set of Variety (linguistics), varieties of the English language native to the United Kingdom, especially Great Britain. More narrowly, it can refer specifically to the English language in England, or, more broadly, to ...
, though this usage is now discouraged. 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 Silent reading is reading done silently, or without speaking the words being read. Before the reintroduction of separated text (spaces between words) in the Late Middle Ages, the ability to read silently may have been considered rather remarkabl ...
eventually replaced this with other considerations.


Usage in English

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. ;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 ''The Bedford Handbook'' is a guide written by Diana Hacker, now in its twelfth edition, that provides basic explanations of proper English grammar, composition, citation, and textual analysis. The guide includes a number of sample texts (includ ...
'' 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. 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''.


Syntactical-deductive

The colon introduces the
logical consequence Logical consequence (also entailment or logical implication) is a fundamental concept in logic which describes the relationship between statement (logic), statements that hold true when one statement logically ''follows from'' one or more stat ...
, or effect, of a fact stated before. :''There was only one possible explanation: the train had never arrived.''


Syntactical-descriptive

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
hour An hour (symbol: h; also abbreviated hr) is a unit of time historically reckoned as of a day and defined contemporarily as exactly 3,600 seconds ( SI). There are 60 minutes in an hour, and 24 hours in a day. The hour was initially establis ...
s,
minute A minute is a unit of time defined as equal to 60 seconds. It is not a unit in the International System of Units (SI), but is accepted for use with SI. The SI symbol for minutes is min (without a dot). The prime symbol is also sometimes used i ...
s, and
second The second (symbol: s) is a unit of time derived from the division of the day first into 24 hours, then to 60 minutes, and finally to 60 seconds each (24 × 60 × 60 = 86400). The current and formal definition in the International System of U ...
s in abbreviated measures of time. :''The concert begins at 21:45.'' :''The rocket launched at 09:15:05.''
British English British English is the set of Variety (linguistics), varieties of the English language native to the United Kingdom, especially Great Britain. More narrowly, it can refer specifically to the English language in England, or, more broadly, to ...
and
Australian English Australian English (AusE, AusEng, AuE, AuEng, en-AU) is the set of variety (linguistics), varieties of the English language native to Australia. It is the country's common language and ''de facto'' national language. While Australia has no of ...
, 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.'' 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 The Bible is a collection of religious texts that are central to Christianity and Judaism, and esteemed in other Abrahamic religions such as Islam. The Bible is an anthology (a compilation of texts of a variety of forms) originally writt ...
or the
Quran The Quran, also Romanization, romanized Qur'an or Koran, is the central religious text of Islam, believed by Muslims to be a Waḥy, revelation directly from God in Islam, God (''Allah, Allāh''). It is organized in 114 chapters (, ) which ...
: :"Isaiah 42:8" :"Deuteronomy 32:39" :"Quran 10:5"


Appositive

:''Luruns could not speak: he was drunk.'' 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, but the reliability of colons as a predictor of quality or impact has also been challenged. In titles, neither needs to be a complete sentence as titles do not represent expository writing: :''Star Wars Episode VI: Return of the Jedi''


Segmental

Like a
dash The dash is a punctuation mark consisting of a long horizontal line. It is similar in appearance to the hyphen but is longer and sometimes higher from the baseline. The most common versions are the endash , generally longer than the hyphen ...
or
quotation mark Quotation marks are punctuation marks used in pairs in various writing systems to identify direct speech, a quotation, or a phrase. The pair consists of an opening quotation mark and a closing quotation mark, which may or may not be the sam ...
, a segmental colon introduces
speech Speech is the use of the human voice as a medium for language. Spoken language combines vowel and consonant sounds to form units of meaning like words, which belong to a language's lexicon. There are many different intentional speech acts, suc ...
. 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 ''The King's English'' is a book on English usage and grammar. It was written by the brothers Henry Watson Fowler and Francis George Fowler and published in 1906; it thus predates by twenty years '' Modern English Usage'', which was written by ...
'': :''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
dialogue Dialogue (sometimes spelled dialog in American and British English spelling differences, American English) is a written or spoken conversational exchange between two or more people, and a literature, literary and theatrical form that depicts suc ...
s, such as in a
play Play most commonly refers to: * Play (activity), an activity done for enjoyment * Play (theatre), a work of drama Play may refer also to: Computers and technology * Google Play, a digital content service * Play Framework, a Java framework * P ...
. 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 capitals

Use of capitalization or lower-case after a colon varies. In
British English British English is the set of Variety (linguistics), varieties of the English language native to the United Kingdom, especially Great Britain. More narrowly, it can refer specifically to the English language in England, or, more broadly, to ...
, and in most
Commonwealth A commonwealth is a traditional English term for a political community founded for the common good. The noun "commonwealth", meaning "public welfare, general good or advantage", dates from the 15th century. Originally a phrase (the common-wealth ...
countries, the word following the colon is in lower case unless it is normally capitalized for some other reason, as with
proper noun A proper noun is a noun that identifies a single entity and is used to refer to that entity ('' Africa''; ''Jupiter''; '' Sarah''; ''Walmart'') as distinguished from a common noun, which is a noun that refers to a class of entities (''continent, ...
s and
acronym An acronym is a type of abbreviation consisting of a phrase whose only pronounced elements are the initial letters or initial sounds of words inside that phrase. Acronyms are often spelled with the initial Letter (alphabet), letter of each wor ...
s. British English also capitalizes a new sentence introduced by a colon's segmental use.
American English American English, sometimes called United States English or U.S. English, is the set of variety (linguistics), varieties of the English language native to the United States. English is the Languages of the United States, most widely spoken lang ...
permits writers to similarly capitalize the first word of any
independent clause In traditional grammar, an independent clause (or main clause) is a clause that can stand by itself as a ''simple sentence''. An independent clause contains a subject and a predicate and makes sense by itself. Independent clauses can be joined ...
following a colon. This follows the guidelines of some modern American style guides, including those published by the
Associated Press The Associated Press (AP) is an American not-for-profit organization, not-for-profit news agency headquartered in New York City. Founded in 1846, it operates as a cooperative, unincorporated association, and produces news reports that are dist ...
and the
Modern Language Association The Modern Language Association of America, often referred to as the Modern Language Association (MLA), is widely considered the principal professional association in the United States for scholars of language and literature. The MLA aims to "str ...
. ''
The Chicago Manual of Style ''The Chicago Manual of Style'' (''CMOS'') is a style guide for American English published since 1906 by the University of Chicago Press. Its 18 editions (the most recent in 2024) have prescribed writing and citation styles widely used in publ ...
'', however, requires capitalization only when the colon introduces a direct quotation, a direct question, or two or more complete sentences. In many
Europe Europe is a continent located entirely in the Northern Hemisphere and mostly in the Eastern Hemisphere. It is bordered by the Arctic Ocean to the north, the Atlantic Ocean to the west, the Mediterranean Sea to the south, and Asia to the east ...
an 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 clause In traditional grammar, an independent clause (or main clause) is a clause that can stand by itself as a ''simple sentence''. An independent clause contains a subject and a predicate and makes sense by itself. Independent clauses can be joined ...
s following a colon. Dutch further capitalizes the first word of any quotation following a colon, even if it is not a complete sentence on its own.


Spacing and parentheses

In print, a thin space was traditionally placed before a colon and a thick space after it. In modern
English-language English is a West Germanic language that developed in early medieval England and has since become a English as a lingua franca, global lingua franca. The namesake of the language is the Angles (tribe), Angles, one of the Germanic peoples th ...
printing, no space is placed before a colon and a single space is placed after it. In
French-language French ( or ) is a Romance language of the Indo-European family. Like all other Romance languages, it descended from the Vulgar Latin of the Roman Empire. French evolved from Northern Old Gallo-Romance, a descendant of the Latin spoken in ...
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 font A monospaced font, also called a fixed-pitch, fixed-width, or non-proportional font, is a font whose letters and characters each occupy the same amount of horizontal space. This contrasts with Typeface#Proportion, variable-width fonts, where t ...
s) was to use ''two'' spaces after a colon. In modern typography, a colon will be placed outside the closing
parenthesis A bracket is either of two tall fore- or back-facing punctuation marks commonly used to isolate a segment of text or data from its surroundings. They come in four main pairs of shapes, as given in the box to the right, which also gives their n ...
introducing a list. In very early English typography, it could be placed inside, as seen in
Roger Williams Roger Williams (March 1683) was an English-born New England minister, theologian, author, and founder of the Colony of Rhode Island and Providence Plantations, Providence Plantations, which became the Colony of Rhode Island and Providence Pl ...
' 1643 book about the Native American languages of New England.


Usage in other languages


Suffix separator

In Finnish and Swedish, the colon can appear inside words in a manner similar to the
apostrophe The apostrophe (, ) is a punctuation mark, and sometimes a diacritical mark, in languages that use the Latin alphabet and some other alphabets. In English, the apostrophe is used for two basic purposes: * The marking of the omission of one o ...
in the English possessive case, connecting a grammatical
suffix In linguistics, a suffix is an affix which is placed after the stem of a word. Common examples are case endings, which indicate the grammatical case of nouns and adjectives, and verb endings, which form the conjugation of verbs. Suffixes can ca ...
to an
abbreviation An abbreviation () is a shortened form of a word or phrase, by any method including shortening (linguistics), shortening, contraction (grammar), contraction, initialism (which includes acronym), or crasis. An abbreviation may be a shortened for ...
or
initialism An acronym is a type of abbreviation consisting of a phrase whose only pronounced elements are the initial letters or initial sounds of words inside that phrase. Acronyms are often spelled with the initial letter of each word in all caps wi ...
, a special symbol, or a digit (e.g., Finnish ''USA:n'' and Swedish ''USA:s'' for the
genitive case In grammar, the genitive case ( abbreviated ) is the grammatical case that marks a word, usually a noun, as modifying another word, also usually a noun—thus indicating an attributive relationship of one noun to the other noun. A genitive ca ...
of "USA", Finnish ''%:ssa'' for the
inessive case In grammar, the inessive case ( abbreviated ; from "to be in or at") is a locative grammatical case. This case carries the basic meaning of "in": for example, "in the house" is in Finnish, in Estonian, () in Moksha, in Basque, in Lithu ...
of "%", or Finnish ''20:een'' for the illative case of "20").


Abbreviation mark

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 Early Modern English (sometimes abbreviated EModEFor example, or EMnE) or Early New English (ENE) is the stage of the English language from the beginning of the Tudor period to the English Interregnum and Restoration, or from the transit ...
texts also used colons to mark abbreviations.


Word separator

In
Ethiopia Ethiopia, officially the Federal Democratic Republic of Ethiopia, is a landlocked country located in the Horn of Africa region of East Africa. It shares borders with Eritrea to the north, Djibouti to the northeast, Somalia to the east, Ken ...
, both
Amharic Amharic is an Ethio-Semitic language, which is a subgrouping within the Semitic branch of the Afroasiatic languages. It is spoken as a first language by the Amhara people, and also serves as a lingua franca for all other metropolitan populati ...
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 The Old Turkic script (also known variously as Göktürk script, Orkhon script, Orkhon-Yenisey script, Turkic runes) was the alphabet used by the Göktürks and other early Turkic peoples, Turkic khanates from the 8th to 10th centuries to recor ...
.


End of sentence or verse

In
Armenian Armenian may refer to: * Something of, from, or related to Armenia, a country in the South Caucasus region of Eurasia * Armenians, the national people of Armenia, or people of Armenian descent ** Armenian diaspora, Armenian communities around the ...
, a colon indicates the end of a sentence, similar to a Latin
full stop The full stop ( Commonwealth English), period (North American English), or full point is a punctuation mark used for several purposes, most often to mark the end of a declarative sentence (as distinguished from a question or exclamation). A ...
or period. In liturgical
Hebrew Hebrew (; ''ʿÎbrit'') is a Northwest Semitic languages, Northwest Semitic language within the Afroasiatic languages, Afroasiatic language family. A regional dialect of the Canaanite languages, it was natively spoken by the Israelites and ...
, the sof pasuq is used in some writings such as prayer books to signal the end of a verse.


Score divider

In German,
Hebrew Hebrew (; ''ʿÎbrit'') is a Northwest Semitic languages, Northwest Semitic language within the Afroasiatic languages, Afroasiatic language family. A regional dialect of the Canaanite languages, it was natively spoken by the Israelites and ...
, 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 logic

The colon is used in
mathematics Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
,
cartography Cartography (; from , 'papyrus, sheet of paper, map'; and , 'write') is the study and practice of making and using maps. Combining science, aesthetics and technique, cartography builds on the premise that reality (or an imagined reality) can ...
, model building, and other fields, in this context it denotes a
ratio In mathematics, a ratio () shows how many times one number contains another. For example, if there are eight oranges and six lemons in a bowl of fruit, then the ratio of oranges to lemons is eight to six (that is, 8:6, which is equivalent to the ...
or a scale, as in 3:1 (pronounced "three to one"). 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 Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
symbol () that is preferred in some contexts. Compare (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 ÷). The notation , : , may also denote the
index of a subgroup In mathematics, specifically group theory, the index of a subgroup ''H'' in a group ''G'' is the number of left Coset, cosets of ''H'' in ''G'', or equivalently, the number of right cosets of ''H'' in ''G''. The index is denoted , G:H, or :Ho ...
. The notation indicates that is a function with domain and codomain . The combination with an equal sign () is used for
definition A definition is a statement of the meaning of a term (a word, phrase, or other set of symbols). Definitions can be classified into two large categories: intensional definitions (which try to give the sense of a term), and extensional definitio ...
s. In
mathematical logic Mathematical logic is the study of Logic#Formal logic, formal logic within mathematics. Major subareas include model theory, proof theory, set theory, and recursion theory (also known as computability theory). Research in mathematical logic com ...
, when using set-builder notation for describing the characterizing property of a
set Set, The Set, SET or SETS may refer to: Science, technology, and mathematics Mathematics *Set (mathematics), a collection of elements *Category of sets, the category whose objects and morphisms are sets and total functions, respectively Electro ...
, it is used as an alternative to a
vertical bar The vertical bar, , is a glyph with various uses in mathematics, computing, and typography. It has many names, often related to particular meanings: Sheffer stroke (in logic), pipe, bar, or (literally, the word "or"), vbar, and others. Usage ...
(which is the
ISO 31-11 ISO 31-11:1992 was the part of international standard ISO 31 that defines ''mathematical signs and symbols for use in physical sciences and technology''. It was superseded in 2009 by ISO 80000-2:2009 and subsequently revised in 2019 as ISO-80000 ...
standard), to mean "such that". Example: :S = \ (''S'' is the set of all in \mathbb (the
real number In mathematics, a real number is a number that can be used to measure a continuous one- dimensional quantity such as a duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
s) such that 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 In mathematics and theoretical computer science, a type theory is the formal presentation of a specific type system. Type theory is the academic study of type systems. Some type theories serve as alternatives to set theory as a foundation of ...
and
programming language theory Programming language theory (PLT) is a branch of computer science that deals with the design, implementation, analysis, characterization, and classification of formal languages known as programming languages. Programming language theory is clos ...
, the colon sign after a term is used to indicate its type, sometimes as a replacement to the "∈" symbol. Example: :\lambda x . x \mathrel A \to A . 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).


Computing

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: * *, used in International Phonetic Alphabet, IPA. *, IPA modifier-letter. *, used in IPA. *, IPA modifier-letter. *, used by Uralic Phonetic Alphabet. *, compatible with right-to-left text. *, for mathematical usage. *, for use in pretty-printing programming languages. * * * * * * *, see Colon (letter). (This character is also sometimes used in Microsoft Windows, 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.) *, compatibility character for the Chinese Standard GB 18030. *, for compatibility with halfwidth and fullwidth forms, halfwidth and fullwidth fonts. *, compatibility character for the Chinese National Standard CNS 11643.


Programming languages

Many programming languages, most notably ALGOL, Pascal (programming language), Pascal and Ada (programming language), Ada, use a colon and equals sign as the assignment (computer science), assignment operator, to distinguish it from a single equals which is an equality test (C (programming language), C instead uses a single equals as assignment, and a double equals as the equality test). Many languages including C (programming language), C and Java (programming language), Java use the colon to indicate the text before it is a label (computer science), label, such as a target for a goto or an introduction to a case in a switch statement. In a related use, Python (programming language), Python uses a colon to separate a control statement (the ''clause header'') from the block of statements it controls (the ''suite''): if test(x): print("test(x) is true!") else: print("test(x) is not true...") In many languages, including JavaScript, colons are used to define name–value pairs in a JSON, dictionary or Object (computer science), object. This is also used by data formats such as JSON. Some other languages use an equals sign. var obj = The colon is used as part of the ?: conditional operator in C and many other languages. C++ uses a double colon as the scope resolution operator, and class member function, class member access. 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 (programming language), Erlang, which uses a single colon. 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. In Forth (programming language), Forth, a colon ''precedes'' definition of a new word. Haskell uses a colon (pronounced as "cons", short for "construct") as an operator to add a data element to the front of a List (computing), list: "child" : ["woman", "man"] -- equals ["child","woman","man"] while a double colon :: is read as "has type of" (compare Scope resolution operator#Haskell, scope resolution operator): ("text", False) :: ([Char], Bool) The ML (programming language), 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. MATLAB uses the colon as a binary operator to generate a vector, or to select a part of an extant matrix. APL (programming language), APL uses the colon: * to introduce a Control flow, control structure element. In this usage it must be the first non-blank character of the line. * 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). * to separate a guard (Boolean expression) from its expression in a dynamic function. Two colons are used for an Error guard (one or more error numbers). * Colon + space are used in class definitions to indicate inheritance. * ⍠ (a colon in a box) is used by APL for its variant operator. The colon is also used in many operating systems commands. In the esoteric programming language INTERCAL, the colon is called ''two-spot'' and used to label a 32-bit computing, 32-bit variable, distinct from ''spot'' (.) to label a 16-bit computing, 16-bit variable.


Addresses

Internet URLs use the colon to separate the protocol (such as ) from the hostname or IP address. In an IPv6 address#Representation, IPv6 address, colons (and one optional double colon) separate up to 8 groups of 16 bits in hexadecimal representation. 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. In Microsoft Windows filenames, the colon is reserved for use in fork (file system)#Microsoft, alternate data streams and cannot appear in a filename. 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 though this gradually disappeared except for disks (where it had to be between the disk name and the required path (computing), path representation of the file as in C:\Windows\). This then migrated to use in Uniform Resource Locator, URLs.


Text markup

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. In human-readable text messages, a colon, or multiple colons, is sometimes used to denote an action (similar to how asterisks are used) 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 also

* Semicolon () * Two dots (disambiguation)


Notes


References


External links

*
Walden University Guides
Punctuation: Colons {{Authority control Punctuation Typographical symbols Programming language comparisons Articles with example Haskell code Articles with example JavaScript code Articles with example Python (programming language) code