Bracket
From Wikipedia, the free encyclopedia
Categories: Articles with sections needing expansion | Punctuation | Mathematical notation | Typography
|
For other senses of this word, see bracket (disambiguation).
For technical reasons, :) (smiley face) and some similar combinations starting with : redirect here. See emoticon.
Brackets are punctuation marks used in pairs to set apart or interject text within other text. With respect to computer science, the term is sometimes said to only strictly apply to the square or box type.[1] There are four main types of brackets:
All these forms may be used according to typographical conventions that may vary from publication to publication and may vary even more from language to language. Some typical uses in English texts follow.
HistoryThe angle bracket was the earliest type to appear in English. Desiderius Erasmus coined the term lunula to refer to the rounded parentheses (), recalling the round shape of the moon. [2] UsageIn addition to referring to the class of all types of brackets, the unqualified word bracket is most commonly used to refer to a specific type of bracket. In modern American usage this is usually the square bracket, whereas in modern British usage it is usually the parenthesis (round bracket). In American usage, parentheses are usually considered separately from other brackets, and calling them “brackets” at all is unusual, even though they serve a similar function. In more formal usage, “parenthesis” may refer to the entire bracketed text, not just to the punctuation marks used (so all the text in this set of round brackets may be said to be a parenthesis). TypesParentheses ( )Parentheses (singular parenthesis)—sometimes called round brackets, curved brackets, oval brackets, or just brackets; or, colloquially, parens, or fingernails— contain material that could be omitted without destroying or altering the meaning of a sentence. In formal writing, parentheses may be used to add supplementary information, such as “Sen. Edward Kennedy (D., Massachusetts) spoke at length.” They can also indicate shorthand for “either singular or plural” for nouns—e.g., “the claim(s)”. In literature and informal writing, parenthetical phrases have been used extensively in stream of consciousness literature. Of particular note is the southern American author William Faulkner (see Absalom, Absalom! and the Quentin section of The Sound and the Fury). In most writing, overuse of parentheses is usually a sign of a badly structured text. A milder effect may be obtained by using a pair of commas as the delimiter. If the sentence contains commas for other purposes, visual confusion may result. Historically, parentheses have been used where the dash is currently used—that is, in order to depict alternatives, such as “parenthesis)(parentheses”. Examples of this usage can be seen in editions of Fowler’s. Parentheses may also be nested (with one set (such as this) inside another set). This is not commonly used in formal writing (though sometimes other brackets [especially square brackets] will be used for one or more inner set of parentheses [in other words, secondary {or even tertiary} phrases can be found within the main sentence]). Any punctuation inside parentheses or other brackets is independent of the rest of the text: “Mrs. Pennyfarthing (What? Yes, that was her name!) was my landlady.” In this usage, the explanatory text in the parentheses is a parenthesis. (It is most common for the parenthesized text to be within a single sentence, but not uncommon for an entire sentence, or even several sentences, of supplemental material to be in parenthesis. In this case, even the final full stop would be within the parentheses. Again, the parenthesis implies that the meaning and flow of the text as a whole would be unchanged were the parenthesized sentences removed.) In mathematics, parentheses signify a different precedence of operators. For example, 2 + 3 × 4 would be 14, since the multiplication is done before the addition. On the other hand, (2 + 3) × 4 is 20, because the parentheses override normal precedence, causing the addition to be done first. They are also used to set apart the arguments in mathematical functions. For example, f(x) is the function f applied to the variable x. In the coordinate system, parentheses denote a set of coordinates. For example, (4,7) may represent the point located at 4 on the x-axis and 7 on the y-axis. Parentheses may also represent intervals. For example, (0,5) is the interval between 0 and 5, not including 0 or 5. Parentheses can also represent multiplication, as in the instance of 2 (3) = 6. Some authors follow the convention in mathematical equations that when parentheses have one level of nesting, the inner pair are parentheses and the outer pair are square brackets. Ex: [5-(7+3)]+4=x. Parentheses may also be used to represent a binomial coefficient. In computer programming, especially in the C programming language and similar languages, parentheses are used to pass parameters or arguments to functions or methods such as in the example below: getAverage(2,7,5); Box brackets or square brackets [ ]Square brackets enclose explanatory or missing […] material, especially in quoted text. For example, “I appreciate it [the honor], but I must refuse”. Or, “the future of psionics [see definition] is in doubt”. The bracketed expression [sic] is used to indicate errors that are “thus in the original”; a bracketed ellipsis […] is often used to indicate deleted material; bracketed comments indicate when original text has been modified for clarity: “I’d like to thank [several unimportant people] and my parentals [sic] for their love, tolerance […] and assistance [italics added]”. In mathematics, square brackets are used in a variety of notations, including standard notations for intervals, commutators, the Lie bracket, and the Iverson bracket. Square brackets are also used as parentheses within parentheses (alternating between parentheses and square brackets as nesting gets deeper [despite the alternative use of curly braces for this purpose (as mentioned earlier)]. With the International Phonetic Alphabet, square brackets indicate a phonetic transcription (as opposed to a phonemic one). In chemistry, square brackets can also be used to represent the concentration of a chemical substance, or to denote a complex ion. In computer programming, square brackets can be used to access array elements, especially in C-like languages. In programming manuals, square brackets are used to denote missing or optional parameters. In architecture, square brackets can be used to emphasize cool words, such as [metaliving] or [cityscape]. In proofreading, square brackets (called move-left symbols or move right symbols) are added to the sides of text to indicate changes in indentation:
When preparing drafts prior to finalizing a document, square brackets are used to denote parts of the text that need to be checked. In legal drafting, square brackets often denote points that have not yet been agreed. In Case citation in the legal realm, square brackets denote the year in which a report was made for certain case law decisions. Curly brackets or braces { }Curly brackets (so-called in British English; North American English prefers braces) are sometimes used in prose to indicate a series of equal choices: “Select your animal {goat, sheep, cow, horse} and follow me”. They are used in specialized ways in poetry and music (to mark repeats or joined lines). The musical terms for this mark joining staves are “accolade” and “brace.” In mathematics they delimit sets. In many programming languages, they enclose groups of statements. Such languages are therefore called curly bracket languages. Presumably due to the similarity of the words brace and bracket (although they do not share an etymology), many people casually treat brace as a synonym for bracket. Therefore, when it is necessary to avoid any possibility of confusion, such as in computer programming, it may be best to use the term curly bracket rather than brace. However, general usage in North American English favours the latter form. The term curly braces is redundant since no other type of brace exists. Indian programmers often use the name “flower bracket”. Curly brackets are often used in internet communities and through instant messaging to indicate hugging.[3] Angle brackets or chevrons ⟨ ⟩Angle brackets (⟨ ⟩; Unicode U+27E8 and U+27E9; and others, see below) are often used to enclose highlighted material. Some dictionaries use angle brackets to enclose short excerpts illustrating the usage of words. In physical sciences, angle brackets are used to denote an average over time or another continuous parameter. For example,
In textual criticism, and hence in many editions of poorly transmitted works, angle brackets denote sections of the text which are illegible or otherwise lost; the editor will often insert his own reconstruction where possible within them. Angle brackets are infrequently used to denote dialogue that is thought instead of spoken, such as:
Single and double angle brackets or pairs of comparison operators (<<, >>) are sometimes used instead of guillemets («, ») (used as quotation marks in many languages) when the proper glyphs are not available. The mathematical or logical symbols for greater-than (>) and less-than (<) are inequality operators, and are not punctuation marks when so used. Nevertheless, since true angle brackets are not available on a typical computer keyboard, the “less than” and “greater than” symbols are often used instead. These are often loosely referred to as angle brackets when used in this way. For example, the symbols < and > are often used to set apart URLs in text, such as “I found it on Example.com <http://www.example.com/>”. It may also often be found to indicate an e-mail address, such as “This photo is copyrighted by John Smith <john@smith.com>”, and is the computer-readable form for such in message headers as specified by RFC 2822. Chevrons are part of standard Chinese, and Korean punctuation, where they generally enclose the titles of books: ︿ and ﹀ or ︽ and ︾ for traditional vertical printing, and 〈 and 〉 or 《 and 》 for horizontal printing. In comic books, angle brackets are often used to mark dialogue that has been translated notionally from another language; in other words, if a character is speaking another language, instead of writing in the other language and providing a translation, one writes the translated text within angle brackets. Of course, since no foreign language is actually written, this is only notionally translated. Angle brackets can also be used to indicate an action or status (eg. <Waves> or <Offline>), particularly in online, real-time text-based discussions (instant messaging, bulletin boards, etc). (Here, asterisks can also be used to signify an action.) In computingImage:Brackets.svg
Various brackets in Arial
|


