Question mark
The question mark '' is a punctuation mark that indicates a question or interrogative clause or phrase in many languages.
History
The history of the question mark is contested. One popular theory posits that the shape of the symbol is inspired by the crook in a cat's tail, often attributed to the ancient Egyptians. However, Egyptian hieroglyphics did not use punctuation marks.In the fifth century, Syriac Bible manuscripts used question markers, according to a 2011 theory by manuscript specialist Chip Coakley: he believes the zagwa elaya, a vertical double dot over a word at the start of a sentence, indicates that the sentence is a question.
File:Btv1b6000718s.png|thumb|8th century punctus interrogativus from the Godescalc Evangelistary.
From around 783, in Godescalc Evangelistary, a mark described as "a lightning flash, striking from right to left" is attested. This mark is later called a. According to some paleographers, it may have indicated intonation, perhaps associated with early musical notation like neumes. Another theory, is that the "lightning flash" was originally a tilde or titlo, as in, one of many wavy or more or less slanted marks used in medieval texts for denoting things such as abbreviations, which would later become various diacritics or ligatures. The creation of the punctus interrogativus has also been attributed to Alcuin of York, an advisor to Charlemagne.
File:Punctus interrogativus from Bern, Bürgerbibliothek Cod. 162, f. 15r.jpg|thumb|An 11th century punctus interrogativus; in the third line, before "tamen".
From the 10th century, the pitch-defining element seems to have been gradually forgotten, so that the "lightning flash" sign is often seen indifferently at the end of clauses, whether they embody a question or not.
In the early 13th century, when the growth of communities of scholars in Paris and other major cities led to an expansion and streamlining of the book-production trade, punctuation was rationalized by assigning the "lightning flash" specifically to interrogatives; by this time, the stroke was more sharply curved and can easily be recognized as the modern question mark.
In 1598, the English term point of interrogation is attested in an Italian–English dictionary by John Florio.
In the 1850s, the term question mark is attested:
Scope
In English, the question mark typically occurs at the end of a sentence, where it replaces the full stop. However, the question mark may also occur at the end of a clause or phrase, where it replaces the comma :or:
This is quite common in Spanish, where the use of bracketing question marks explicitly indicates the scope of interrogation.
A question mark may also appear immediately after questionable data, such as dates:
In other languages and scripts
Opening and closing question marks in Spanish
In Spanish, since the second edition of the Ortografía of the Real Academia Española in 1754, interrogatives require both opening and closing question marks. An interrogative sentence, clause, or phrase begins with an inverted question mark and ends with the question mark, as in:Question marks must always be matched, but to mark uncertainty rather than actual interrogation omitting the opening one is allowed, although discouraged:
The omission of the opening mark is common in informal writing, but is considered an error. The one exception is when the question mark is matched with an exclamation mark, as in:
Nonetheless, even here the Academia recommends matching punctuation:
The opening question mark in Unicode is.
Solomon Islands Pidgin
In Solomon Islands Pidgin, the question can be between question marks since, in yes/no questions, the intonation can be the only difference.?Solomon Aelan hemi barava gudfala kandre, ia man?
Armenian question mark
In Armenian, the question mark is a diacritic that takes the form of an open circle and is placed over the stressed vowel of the question word. It is defined in Unicode at.Greek question mark
The Greek question mark looks like. It appeared around the same time as the Latin one, in the 8th century. It was adopted by Church Slavonic and eventually settled on a form essentially similar to the Latin semicolon. In Unicode, it is separately encoded as, but the similarity is so great that the code point is normalised to, making the marks identical in practice.Mirrored question mark in right-to-left scripts
In Arabic and other languages that use Arabic script such as Persian, Urdu and Uyghur, which are written from right to left, the question mark is mirrored right-to-left from the Latin question mark. In Unicode, two encodings are available: and. Some browsers may display the character in the previous sentence as a forward question mark due to font or text directionality issues.The Arabic question mark is also used in some other right-to-left scripts: Dhivehi, N'Ko, Syriac, and Adlam. Adlam also has : ? ???? ؟, 'No?'.
Hebrew script is also written right-to-left, but it uses a question mark that appears on the page in the same orientation as the left-to-right question mark.
Fullwidth question mark in East Asian languages
The question mark is also used in modern writing in Chinese and, to a lesser extent, Japanese. Usually, it is written as fullwidth form in Chinese and Japanese, in Unicode:. Fullwidth form is always preferred in official usage. In Korean, however, halfwidth is used.Japanese has an interrogative particle, か, which functions grammatically like a question mark. Therefore, the question mark is not historically used in Japanese, and is still not officially sanctioned for use in government publications or school textbooks, but its popularity has been gradually increasing among younger people. Where official usage is 終わったのかもしれませんよ。, some people would now informally write 終わったのかもしれませんよ? to express "It may be over"; the question mark here adds a nuance of uncertainty to the sentence rather than turning it into a question.
Chinese also has a spoken indicator of questions, which is 吗. However, the question mark should always be used after 吗 when asking questions.
In other scripts
Some other scripts have a specific question mark:- , and
Stylistic variants
Typological variants of ''?''
The rhetorical question mark or percontation point was invented by Henry Denham in the 1580s and was used at the end of a rhetorical question; however, it became obsolete in the 17th century. It was the reverse of an ordinary question mark, so that instead of the main opening pointing back into the sentence, it opened away from it. This character can be represented using.Bracketed question marks can be used for rhetorical questions, for example, in informal contexts such as closed captioning.
The question mark can also be used as a meta-sign to signal uncertainty regarding what precedes it. It is usually put between brackets:. The uncertainty may concern either a superficial level, or a deeper truth.
In typography, some other variants and combinations are available: "⁇," "⁈," and "⁉," are usually used for chess annotation symbols; the interrobang, "‽," is used to combine the functions of the question mark and the exclamation mark, superposing these two marks.
Unicode makes available these variants:
- * with an emoji variation selector
Computing
The inverted question mark corresponds to Unicode code-point
In shell and scripting languages, the question mark is often utilized as a wildcard character: a symbol that can be used to substitute for any other character or characters in a string. In particular, filename globbing uses "?" as a substitute for any one character, as opposed to the asterisk, "*", which matches zero or more characters in a string.
On Macs, a folder with a question mark on startup means a startup disk is not found or does not contain a compatible operating system.
The question mark is used in ASCII renderings of the International Phonetic Alphabet, such as SAMPA, in place of the glottal stop symbol,,, and corresponds to Unicode code point.
In computer programming, the symbol "?" has a special meaning in many programming languages.
- In C-descended languages,
?is part of the?:operator, which is used to evaluate simple boolean conditions. - In C# 2.0, the
?modifier is used to handle nullable data types and??is the null coalescing operator. - In Java,
?can represent a wildcard type parameter. For instance,List>denotes a list that can hold any type, andList extends T>andList super T>denote a list that can hold any type that inherits from/is an ancestor class of typeT. - In the POSIX syntax for regular expressions, such as that used in Perl and Python,
?stands for "zero or one instance of the previous subexpression", i.e. an optional element. It can also make a quantifier like,+or*match as few characters as possible, making it lazy, e.g./^.*?px/will match the substring165pxin165px 17pxinstead of matching165px 17px. - In certain implementations of the BASIC programming language, the
?character may be used as a shorthand for the "print" function; in others,?is used to address a single-byte memory location. - In OCaml, the question mark precedes the label for an optional parameter.
- In Scheme, as a convention, symbol names ending in
?are used for predicates, such asodd?,null?, andeq?. Similarly, in Ruby, method names ending in?are used for predicates. - In Swift a type followed by
?denotes an option type;?is also used in "optional chaining", where if an option value is nil, it ignores the following operations. Similarly, in Kotlin, a type followed by?is nullable and functions similar to option chaining are supported. - In APL,
?generates random numbers or a random subset of indices. - In Rust, a
?suffix on a function or method call indicates error handling. - In SPARQL, the question mark is used to introduce variable names, such as
?name. In MUMPS, it is the pattern match operator. - In the xBase family of programming languages, which includes dBase and FoxPro, either one or two question marks at the start of a line of code serve as a shorthand for the Print function. The effect is to evaluate the following expression and to send the result either to the screen or a printer. A single question mark sends a carriage return and line feed before the output; this is not the case with a double question mark.
The generic URL syntax allows for a query string to be appended to a resource location in a Web address so that additional information can be passed to a script; the query mark,
?, is used to indicate the start of a query string. A query string is usually made up of a number of different field/value pairs, each separated by the ampersand symbol, &, as seen in this URL:http://www.example.com/search.php?query=testing&database=English Here, a script on the page search.php on the server www.example.com is to provide a response to the query string containing the pairs query=testing and database=English.