HOME

TheInfoList



OR:

The colon is a
punctuation Punctuation (or sometimes interpunction) is the use of spacing, conventional signs (called punctuation marks), and certain typographical devices as aids to the understanding and correct reading of written text, whether read silently or aloud. A ...
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 citations, chapter and verse in
Bible citation A citation from the Bible is usually referenced with the book name, chapter number and verse number. Sometimes, the name of the Bible translation is also included. There are several formats for doing so. Common formats A common format for bibl ...
s, and, in the US, for salutations in business letters and other formal letter writing.


History

In
Ancient Greek Ancient Greek includes the forms of the Greek language used in ancient Greece and the ancient world from around 1500 BC to 300 BC. It is often roughly divided into the following periods: Mycenaean Greek (), Dark Ages (), the Archaic pe ...
, in
rhetoric Rhetoric () is the art of persuasion, which along with grammar and logic (or dialectic), is one of the three ancient arts of discourse. Rhetoric aims to study the techniques writers or speakers utilize to inform, persuade, or motivate par ...
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)''. From this usage, in
palaeography Palaeography ( UK) or paleography ( US; ultimately from grc-gre, , ''palaiós'', "old", and , ''gráphein'', "to write") is the study of historic writing systems and the deciphering and dating of historical manuscripts, including the analysi ...
, 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, once practical typewriters became available, typewritten – as opposed to mechanically printed or reproduced i ...
.''Oxford English Dictionary'', 1st ed. "colon, ''n.²''" Oxford University Press (Oxford), 1891. In the 3rd century BC,
Aristophanes of Byzantium __NOTOC__ Aristophanes of Byzantium ( grc-gre, Ἀριστοφάνης ὁ Βυζάντιος ; BC) was a Hellenistic Greek scholar, critic and grammarian, particularly renowned for his work in Homeric scholarship, but also for work on other ...
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, we don't have much evidence for its early usage, but it was revived later as the '' ano teleia'', the
modern Greek Modern Greek (, , or , ''Kiní Neoellinikí Glóssa''), 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 ...
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. When a ...
.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. It is used for several purposes, most often to mark the end of a declarative sentence (as distinguished from a question or exclamatio ...
or to mark a change of speaker. (See also '' Punctuation in Ancient Greek''.) In 1589, in ''The Arte of English Poesie'', the
English English usually refers to: * English language * English people English may also refer to: Peoples, culture, and language * ''English'', an adjective for something of, from, or related to England ** English national ...
term ''colon'' and the corresponding punctuation mark is attested:
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'', ..
In 1622, in Nicholas Okes' print of
William Shakespeare William Shakespeare ( 26 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 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. ''Son-in-law'' is an example of a hyphenated word. The hyphen is sometimes confused with dashes ( figure ...
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 Dog's balls or dog's bollocks may refer to: * The testicles of a dog * '' Grewia retusifolia'', a shrub species in the family Malvaceae * Dog's bollocks, a slang expression in British English * Dog's bollocks (typography) The compound point is ...
'', was once common in
British English British English (BrE, en-GB, or BE) is, according to Oxford Dictionaries, "English as used in Great Britain, as distinct from that used elsewhere". More narrowly, it can refer specifically to the English language in England, or, more broadl ...
; 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 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 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 Apposition is a grammatical construction in which two elements, normally noun phrases, are placed side by side so one element identifies the other in a different way. The two elements are said to be ''in apposition'', and one of the elements is c ...
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 Luca Serianni (; 30 October 1947 – 21 July 2022) was an Italian linguist and philologist. Biography Serianni was professor of Italian language at Sapienza Università di Roma. A student of Arrigo Castellani, he conducted research about Itali ...
, 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) is a fundamental concept in logic, which describes the relationship between statements that hold true when one statement logically ''follows from'' one or more statements. A valid logical argument is on ...
, 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 conventionally reckoned as of a day and scientifically reckoned between 3,599 and 3,601 seconds, depending on the speed of Earth's rotation. There are 60 minutes in an hour, and 24 ...
s, minutes, and
second The second (symbol: s) is the unit of time in the International System of Units (SI), historically defined as of a day – this factor derived from the division of the day first into 24 hours, then to 60 minutes and finally to 60 seconds ea ...
s in abbreviated measures of time. :''The concert begins at 21:45.'' :''The rocket launched at 09:15:05.''
British English British English (BrE, en-GB, or BE) is, according to Oxford Dictionaries, "English as used in Great Britain, as distinct from that used elsewhere". More narrowly, it can refer specifically to the English language in England, or, more broadl ...
, however, more frequently uses 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 (from Koine Greek , , 'the books') is a collection of religious texts or scriptures that are held to be sacred in Christianity Christianity is an Abrahamic monotheistic religion based on the life and teachings of Jesus ...
or the
Quran The Quran (, ; Standard Arabic: , Quranic Arabic: , , 'the recitation'), also romanized Qur'an or Koran, is the central religious text of Islam, believed by Muslims to be a revelation from God. It is organized in 114 chapters (pl.: , ...
: :"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 Narrative exposition is the insertion of background information within a story or narrative. This information can be about the setting, characters' backstories, prior plot events, historical context, etc. In literature, exposition appears in t ...
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, 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 written dialogues, such as in a play. The colon indicates that the words following an individual's name are spoken by that individual. :''Patient: Doctor, I feel like a pair of curtains.'' :''Doctor: Pull yourself together!''


Use of capitals

Use of capitalization or lower-case after a colon varies. In
British English British English (BrE, en-GB, or BE) is, according to Oxford Dictionaries, "English as used in Great Britain, as distinct from that used elsewhere". More narrowly, it can refer specifically to the English language in England, or, more broadl ...
, 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
acronym An acronym is a word or name formed from the initial components of a longer name or phrase. Acronyms are usually formed from the initial letters of words, as in ''NATO'' (''North Atlantic Treaty Organization''), but sometimes use syllables, as ...
s. British English also capitalizes a new sentence introduced by colon's segmental use.
American English American English, sometimes called United States English or U.S. English, is the set of varieties of the English language native to the United States. English is the most widely spoken language in the United States and in most circumstances ...
goes further and 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 The Associated Press (AP) is an American non-profit news agency headquartered in New York City. Founded in 1846, it operates as a cooperative, unincorporated association. It produces news reports that are distributed to its members, U.S. new ...
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 "st ...
. '' 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. In many
Europe Europe is a large peninsula conventionally considered a continent in its own right because of its great physical size and the weight of its history and traditions. Europe is also considered a Continent#Subcontinents, subcontinent of Eurasia ...
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 German(s) may refer to: * Germany (of or related to) **Germania (historical use) * Germans, citizens of Germany, people of German ancestry, or native speakers of the German language ** For citizens of Germany, see also German nationality law **Ge ...
usage requires capitalization of independent clauses 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

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. In
French-language French ( or ) is a Romance language of the Indo-European family. It descended from the Vulgar Latin of the Roman Empire, as did all Romance languages. French evolved from Gallo-Romance, the Latin spoken in Gaul, and more specifically in No ...
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 variable-width fonts, where the letters and spaci ...
s) was to use ''two'' spaces after a colon.


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 ( or ) 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 ...
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, adjectives, and verb endings, which form the conjugation of verbs. Suffixes can carr ...
to an abbreviation or
initialism An acronym is a word or name formed from the initial components of a longer name or phrase. Acronyms are usually formed from the initial letters of words, as in ''NATO'' (''North Atlantic Treaty Organization''), but sometimes use syllables, as ...
, 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 can a ...
of "USA", Finnish ''%:ssa'' for the inessive case 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 The Stockholm metro ( sv, Stockholms tunnelbana) is a rapid transit system in Stockholm, Sweden. The first line opened in 1950, and today the system has 100 stations in use, of which 47 are underground and 53 above ground. There are three col ...
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.


Word separator

In
Ethiopia Ethiopia, , om, Itiyoophiyaa, so, Itoobiya, ti, ኢትዮጵያ, Ítiyop'iya, aa, Itiyoppiya officially the Federal Democratic Republic of Ethiopia, is a landlocked country in the Horn of Africa. It shares borders with Eritrea to the ...
, both
Amharic Amharic ( or ; (Amharic: ), ', ) is an Ethiopian Semitic language, which is a subgrouping within the Semitic branch of the Afroasiatic languages. It is spoken as a first language by the Amharas, and also serves as a lingua franca for all oth ...
and Ge'ez script used and sometimes still use a colon-like mark as word separator.


End of sentence or verse

In Armenian, 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. It is used for several purposes, most often to mark the end of a declarative sentence (as distinguished from a question or exclamatio ...
or period. In
Hebrew Hebrew (; ; ) is a Northwest Semitic language of the Afroasiatic language family. Historically, it is one of the spoken languages of the Israelites and their longest-surviving descendants, the Jews and Samaritans. It was largely preserved ...
, the sof pasuq is used in some writings such as prayer books to signal the end of a verse.


Score divider

In
German German(s) may refer to: * Germany (of or related to) **Germania (historical use) * Germans, citizens of Germany, people of German ancestry, or native speakers of the German language ** For citizens of Germany, see also German nationality law **Ge ...
, a colon divides the scores of opponents in sports and games. A result of 149–0 would be written as 149 : 0 in German.


Mathematics and logic

The colon is used in
mathematics Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
,
cartography Cartography (; from grc, χάρτης , "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 i ...
,
model building Model building is a hobby and career that involves the creation of physical models either from kits or from materials and components acquired by the builder. The kits contain several pieces that need to be assembled in order to make a final mod ...
, 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 usages the proper
Unicode Unicode, formally The Unicode Standard,The formal version reference is is an information technology standard for the consistent encoding, representation, and handling of text expressed in most of the world's writing systems. The standard, ...
symbol is that is a little higher up than the normal colon. Compare 2∶3 (ratio colon) with 2:3 (normal 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. The notation indicates that is a function with domain and codomain . The combination with an equal sign () is used for definitions. In
mathematical logic Mathematical logic is the study of formal logic within mathematics. Major subareas include model theory, proof theory, set theory, and recursion theory. Research in mathematical logic commonly addresses the mathematical properties of forma ...
, 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 (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-800 ...
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 distance, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small variations. Every ...
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 and
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
theory, 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 ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because ...
and from there inherited into Unicode. Unicode also defines several related characters. * *, used in
IPA IPA commonly refers to: * India pale ale, a style of beer * International Phonetic Alphabet, a system of phonetic notation * Isopropyl alcohol, a chemical compound IPA may also refer to: Organizations International * Insolvency Practitioners A ...
. *, 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), sometimes used in
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for se ...
filename A filename or file name is a name used to uniquely identify a computer file in a directory structure. Different file systems impose different restrictions on filename lengths. A filename may (depending on the file system) include: * name &ndas ...
s 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 half/full width fonts. *, compatibility character for the Chinese National Standard
CNS 11643 The CNS 11643 character set (Chinese National Standard 11643), also officially known as the Chinese Standard Interchange Code or CSIC ( zh, tr=, t=中文標準交換碼), is officially the standard character set of Taiwan (Republic of China). In p ...
.


Programming languages

A number of programming languages, most notably
Pascal Pascal, Pascal's or PASCAL may refer to: People and fictional characters * Pascal (given name), including a list of people with the name * Pascal (surname), including a list of people and fictional characters with the name ** Blaise Pascal, Frenc ...
and
Ada Ada may refer to: Places Africa * Ada Foah, a town in Ghana * Ada (Ghana parliament constituency) * Ada, Osun, a town in Nigeria Asia * Ada, Urmia, a village in West Azerbaijan Province, Iran * Ada, Karaman, a village in Karaman Province, T ...
, use a colon immediately followed by an equals sign (:=) as the
assignment operator Assignment, assign or The Assignment may refer to: * Homework * Sex assignment * The process of sending National Basketball Association players to its development league; see Computing * Assignment (computer science), a type of modification t ...
, to distinguish it from a single equals which is an equality test (C instead used a single equals as assignment, and a double equals as the equality test). Many languages including C and
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
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 In computer programming languages, a switch statement is a type of selection control mechanism used to allow the value of a variable or expression to change the control flow of program execution via search and map. Switch statements function s ...
. In a related use, Python uses a colon to separate a control statement from the block of statements it controls: if test(x): print("test(x) is true!") else: print("test(x) is not true...") In a number of languages, including
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of websites use JavaScript on the client side for webpage behavior, of ...
, colons are used to define name–value pairs in a
dictionary A dictionary is a listing of lexemes from the lexicon of one or more specific languages, often arranged alphabetically (or by radical and stroke for ideographic languages), which may include information on definitions, usage, etymologie ...
or
object Object may refer to: General meanings * Object (philosophy), a thing, being, or concept ** Object (abstract), an object which does not exist at any particular time or place ** Physical object, an identifiable collection of matter * Goal, an ...
. 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 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, 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 Forth or FORTH may refer to: Arts and entertainment * ''forth'' magazine, an Internet magazine * ''Forth'' (album), by The Verve, 2008 * ''Forth'', a 2011 album by Proto-Kaw * Radio Forth, a group of independent local radio stations in Scotla ...
, a colon ''precedes'' definition of a new word. Haskell uses a colon (pronounced as " cons", short for "construct") as an operator to add an element to the front of a list: "child" : woman", "man"-- equals child","woman","man"/syntaxhighlight> while a double colon :: is read as "has type of" (compare scope resolution operator): ("text", False) :: ( har Bool) 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.
MATLAB MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementat ...
uses the colon as a binary operator that generates vectors, as well as to select particular portions of existing matrices. APL uses the colon * to introduce a 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 (Note: this style of programming is deprecated and programmers are encouraged 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 is used to identify a 32-bit variable—distinct from a spot (.) which identifies a 16-bit variable.


Addresses

Internet URLs use the colon to separate the protocol (such as ) from the hostname or
IP address An Internet Protocol address (IP address) is a numerical label such as that is connected to a computer network that uses the Internet Protocol for communication.. Updated by . An IP address serves two main functions: network interface ident ...
. In an
IPv6 address An Internet Protocol Version 6 address (IPv6 address) is a numeric label that is used to identify and locate a network interface of a computer or a network node participating in a computer network using IPv6. IP addresses are included in the p ...
colons (and one optional double colon) separate up to 8 groups of 16 bits in
hexadecimal In mathematics and computing, the hexadecimal (also base-16 or simply hex) numeral system is a positional numeral system that represents numbers using a radix (base) of 16. Unlike the decimal system representing numbers using 10 symbols, he ...
representation. In a URL a colon follows the initial scheme name (such as
HTTP The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide We ...
and FTP), and separates a port number from the hostname or
IP address An Internet Protocol address (IP address) is a numerical label such as that is connected to a computer network that uses the Internet Protocol for communication.. Updated by . An IP address serves two main functions: network interface ident ...
. In
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
filename A filename or file name is a name used to uniquely identify a computer file in a directory structure. Different file systems impose different restrictions on filename lengths. A filename may (depending on the file system) include: * name &ndas ...
s, the colon is reserved for use in
alternate data streams New Technology File System (NTFS) is a proprietary journaling file system developed by Microsoft. Starting with Windows NT 3.1, it is the default file system of the Windows NT family. It superseded File Allocation Table (FAT) as the preferred fi ...
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 macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and la ...
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 CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/ 85-based microcomputers by Gary Kildall of Digital Research, Inc. Initi ...
and early versions of
MSDOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few ...
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 representation of the file as in C:\Windows\). This then migrated to use in
URLs A Uniform Resource Locator (URL), colloquially termed as a web address, is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identi ...
.


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 MediaWiki is a free and open-source wiki software. It is used on Wikipedia and almost all other Wikimedia websites, including Wiktionary, Wikimedia Commons and Wikidata; these sites define a large part of the requirement set for Media ...
, utilize the colon as both a pre-fix and post-fix delimiter. In
wiki markup A wiki ( ) is an online hypertext publication collaboratively edited and managed by its own audience, using a web browser. A typical wiki contains multiple pages for the subjects or scope of the project, and could be either open to the pub ...
, 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 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. When a ...
() *
Two dots (disambiguation) The term two dots or double dot may refer to: Orthography * Colon (punctuation), the punctuation mark () * Two dots (diacritic), a mark used with a base letter to indicate that its pronunciation is somehow modified () ** Diaeresis (diacritic), th ...


Notes


References


External links

*
Walden University Guides
Punctuation: Colons {{Authority control Punctuation Typographical symbols