All Topics  
Bracket

 

   Email Print
   Bookmark   Link






 

Bracket



 
 
For PAREN, see National Rebirth Party
National Rebirth Party

The National Rebirth Party is a political party in Burkina Faso At the legislative elections in Burkina Faso, 5 May 2002, the party won 2.7 % of the popular vote and 4 out of 111 seats....
Brackets are punctuation
Punctuation

Punctuation is everything in written language other than the actual letters or numbers, including punctuation marks , Interword separation and indentation....
 marks used in pairs to set apart or interject text within other text. In computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
, the term is sometimes said to strictly apply to the square or box type.

There are four main types of brackets:

All these forms may be used according to typographical
Typography

Typography is the art and techniques of typesetting, type design, and modifying type glyphs. Type glyphs are created and modified using a variety of illustration techniques....
 conventions that may vary from publication to publication and may vary even more from language to language.






Discussion
Ask a question about 'Bracket'
Start a new discussion about 'Bracket'
Answer questions from other users
Full Discussion Forum



Recent Posts









Encyclopedia


For PAREN, see National Rebirth Party
National Rebirth Party

The National Rebirth Party is a political party in Burkina Faso At the legislative elections in Burkina Faso, 5 May 2002, the party won 2.7 % of the popular vote and 4 out of 111 seats....
Brackets are punctuation
Punctuation

Punctuation is everything in written language other than the actual letters or numbers, including punctuation marks , Interword separation and indentation....
 marks used in pairs to set apart or interject text within other text. In computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
, the term is sometimes said to strictly apply to the square or box type.

There are four main types of brackets:
  • round brackets, open brackets, or parentheses:  ( )
  • square brackets, closed brackets, or box brackets:  [ ]
  • curly brackets or braces:  
  • angle brackets, diamond brackets, or chevrons:  < > or


All these forms may be used according to typographical
Typography

Typography is the art and techniques of typesetting, type design, and modifying type glyphs. Type glyphs are created and modified using a variety of illustration techniques....
 conventions that may vary from publication to publication and may vary even more from language to language. Some typical uses in English texts follow.

History

The angle bracket was the earliest type to appear in English. Desiderius Erasmus
Desiderius Erasmus

Desiderius Erasmus Roterodamus was a Netherlands Renaissance humanist and Roman Catholic Church Christian theology. His scholarly name Desiderius Erasmus Roterodamus comprises the following three elements: the Latin noun desiderium ; the Greek adjective ???s???? meaning "desired", and, in the form Erasmus, also the name of a St....
 coined the term lunula to refer to the rounded parentheses , recalling the round shape of the moon
Moon

The Moon is Earth's only natural satellite and the List of natural satellites by diameter satellite in the Solar System. The average centre-to-centre distance from the Earth to the Moon is km, about thirty times the diameter of the Earth....
.

Usage

In 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
Parenthesis (rhetoric)

In rhetoric, a parenthesis isaccording to the Oxford English Dictionary....
” 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
Parenthesis (rhetoric)

In rhetoric, a parenthesis isaccording to the Oxford English Dictionary....
).

Types


Parentheses
Parentheses (singular, parenthesis)—sometimes called round brackets, curved brackets, oval brackets, or just brackets, or, colloquially, parens — contain material that could be omitted without destroying or altering the meaning of a sentence.

Parentheses may be used in formal writing 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)”.

Parenthetical phrases have been used extensively in informal writing and stream of consciousness literature. Of particular note is the southern American author William Faulkner
William Faulkner

William Faulkner was a Nobel Prize in Literature-winning United States author. One of the most influential writers of the 20th century, his reputation is based on his novels, novellas and short story....
 (see Absalom, Absalom!
Absalom, Absalom!

Absalom, Absalom! is a Southern Gothic novel by the United States author William Faulkner, published in 1937. It is a story about three families of the Southern United States, taking place before, during, and after the American Civil War, with the focus of the story on the life of Thomas Sutpen....
 and the Quentin section of The Sound and the Fury) as well as poet E. E. Cummings
E. E. Cummings

Edward Estlin Cummings , popularly known as E. E. Cummings, was an Poetry of the United States, painter, essayist, author, and playwright....
. 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
Delimiter

A delimiter is a sequence of one or more character s used to specify the boundary between separate, independent regions in plain text or other data stream....
. If the sentence contains commas for other purposes visual confusion may result.

Parentheses have historically been used where the dash
Dash

A dash is a punctuation mark. It is longer than a hyphen and is used differently. The most common versions of the dash are the en dash and the em 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 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
Parenthesis (rhetoric)

In rhetoric, a parenthesis isaccording to the Oxford English Dictionary....
. (It is most common for the parenthesized text to be within a single sentence but also common for an entire sentence, or even several sentences, of supplemental material to be in parentheses. In this case even the final full stop
Full stop

A full stop or period , is the punctuation mark commonly placed at the end of several different types of Sentence s in English language and many other languages....
 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.)

Parentheses in mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
 signify a different precedence
Order of operations

In algebra and computer programming, when a number or expression is both preceded and followed by an operator such as minus or multiplication, a rule is needed to specify which operator should be applied first; this rule is known as a precedence rule, or more informally order of operation....
 of operators. 2 + 3 × 4 would be 14, for example, since the multiplication is done before the addition. (2 + 3) × 4 is 20, on the other hand, because the parentheses override normal precedence, causing the addition to be done first. They are also used to set apart the argument
Parameter

In mathematics, statistics, and the mathematical sciences, a parameter is a quantity that defines certain characteristics of systems or function s....
s in mathematical function
Function (mathematics)

The mathematical concept of a function expresses dependence between two quantities, one of which is known and the other which is produced. A function associates a single output to each input element drawn from a fixed Set , such as the real numbers , although different inputs may have the same output....
s. f(x), for example, is the function f applied to the variable
Variable

A variable is a symbol that stands for a value that may vary; the term usually occurs in opposition to constant, which is a symbol for a non-varying value, i.e....
 x. Parentheses denote a set of coordinates in the coordinate system
Coordinate system

In mathematics and its applications, a coordinate system is a system for assigning an n-tuple of numbers or scalar to each Point in an n-dimensional space....
. (4,7), for example, may represent the point located at 4 on the x-axis and 7 on the y-axis. Parentheses may also represent intervals
Interval (mathematics)

In mathematics, a interval is a set of real numbers with the property that any number that lies between two numbers in the set is also included in the set....
. (0,5), for example, 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. Example:

[5-(7+3)]+4=x.

Parentheses may also be used to represent a binomial coefficient
Binomial coefficient

In mathematics, the binomial coefficient is the coefficient of the x k term in the polynomial expansion of the binomial exponentiation  n....
.

Parentheses are used in computer programming, especially in the C programming language
C (programming language)

C is a general-purpose computer programming language originally developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories to implement the Unix operating system....
 and similar languages, to pass parameters
Parameter (computer science)

In computer programming, a parameter is a special kind of variable#In_computer_programming that refers to data that a subroutine receives to operate on....
 or arguments to functions or methods such as in the following example:

getAverage(2,8,5);

Box brackets or square brackets [ ]
Square brackets are mainly used to enclose explanatory or missing material usually added by someone other than the original author, especially in quoted text. Examples include: “I appreciate it [the honor], but I must refuse”, and “the future of psionics [see definition] is in doubt”.

The bracketed expression [sic
SIC

Sic is a Latin word that means "thus" or, in writing, "it was thus in the source material".Sic may also refer to:* Sic, Cluj, a commune in Romania...
] is used to indicate errors that are “thus in the original”; a bracketed ellipsis
Ellipsis

Ellipsis in printing and writing refers to a mark or series of marks that usually indicate an intentional omission of a word or a phrase from the original text....
 […] 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 [emphasis added]”.

Square brackets are used in mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
 in a variety of notations, including standard notations for intervals
Interval (mathematics)

In mathematics, a interval is a set of real numbers with the property that any number that lies between two numbers in the set is also included in the set....
, commutator
Commutator

In mathematics, the commutator gives an indication of the extent to which a certain binary operation fails to be commutative. There are different definitions used in group theory and ring theory....
s, the Lie bracket
Lie bracket

Lie bracket can refer to:*Lie algebra*Lie bracket of vector fields...
, and the Iverson bracket
Iverson bracket

In mathematics, the Iverson bracket is a convenient notation that denotes a number that is 1 if the condition in square brackets is satisfied, and 0 otherwise....
.

In translated works, square brackets are used to signify the same word or phrase in the original language to avoid ambiguity. For example: He is trained in the way of the open hand [karate].

When nested parentheses are needed, square brackets may be used as a substitute for the inner pair of parentheses within the outer pair. When deeper levels of nesting are needed, common conventions are to alternate between parentheses and square brackets at each level or to use curly braces.

A phonetic
Phonetics

Phonetics is a branch of linguistics that comprises the study of the sounds of human speech. It is concerned with the physical properties of speech sounds , and the processes of their physiological production, auditory reception, and neurophysiological perception....
 transcription may be enclosed within square brackets, often using the International Phonetic Alphabet
International Phonetic Alphabet

The International Phonetic Alphabet "The acronym 'IPA' strictly refers [...] to the 'International Phonetic Association'. But it is now such a common practice to use the acronym also to refer to the alphabet itself that resistance seems pedantic....
. Note though that phonemic
Phoneme

In human language, a phoneme is the smallest posited linguistically distinctive unit of sound. Phonemes carry no semantic content themselves. In theoretical terms, phonemes are not the physical segment s themselves, but cognitive abstractions or categorizations of them....
, rather than phonetic, transcriptions typically use paired slashes
Slash (punctuation)

The slash is a punctuation mark. It is also called a virgule, diagonal, stroke, forward slash, oblique dash, slant, separatrix, scratch comma, over, slak, whack....
 rather than brackets.

Square brackets can also be used in chemistry
Chemistry

Chemistry is the science concerned with the composition, structure, and properties of matter, as well as the changes it undergoes during chemical reactions....
 to represent the concentration
Concentration

In chemistry, concentration is the measure of how much of a given chemical substance there is mixed with another substance. This can apply to any sort of chemical mixture, but most frequently the concept is limited to homogeneous solutions, where it refers to the amount of solute in the solvent....
 of a chemical substance
Chemical substance

A chemical substance is a material with a specific Empirical formula. It is a concept that became firmly established in the late eighteenth century after work by the chemist Joseph Proust on the composition of some pure chemical compounds such as basic copper carbonate....
 or to denote a complex ion
Complex (chemistry)

In chemistry, a complex, also called a "coordination compound" or "metal complex", is a structure consisting of a central atom or molecule connected to surrounding atoms or molecules....
.

Square brackets can be used in computer programming
Computer programming

Computer programming is the process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs. This source code is written in a programming language....
 to access array
Array

In computer science, an array is a data structure consisting of a group of element s that are accessed by index . In most programming languages each element has the same data type and the array occupies a contiguous area of computer memory....
 elements, especially in C-like languages. They are used in programming manuals to denote missing or optional parameters.

Square brackets (called move-left symbols or move right symbols) are added to the sides of text in proofreading
Proofreading

Proof-reading traditionally means reading a proof copy of a writing in order to detect and correct any errors. Modern proofreading often requires reading Copy at earlier stages as well....
 to indicate changes in indentation:

Move left [To Fate I sue, of other means bereft, the only refuge for the wretched left.
Center ]Paradise Lost[
Move up
Quote To Be Moved Up


Square brackets are used to denote parts of the text that need to be checked when preparing drafts prior to finalizing a document. They often denote points that have not yet been agreed to in legal drafts and the year in which a report was made for certain case law
Case law

Case law is the general term for the principles and rules of law set forth in judge legal opinion from courts of law. Case law incorporates courts' decisions from individual legal case and encompasses courts' interpretations of statutes, constitution provisions, administrative law regulations and, in some cases, law originating solely f...
 decisions.

The html entities for the square brackets are &#91; and &#93;

There are situations on a typical computer station where typing square brackets is considerably easier than typing parentheses. I.e., when the user wishes to delimit preexisting, unparenthesized text with parentheses by using the mouse
Mouse (computing)

In computing, a mouse is a pointing device that functions by detecting dimension motion relative to its supporting surface. Physically, a mouse consists of an object held under one of the user's hands, with one or more buttons....
 for placement, only one free hand is needed to type square brackets, whereas parentheses actually require two hands (the second hand for simultaneously holding down the Shift key
Shift key

The shift key is a modifier key on a alphanumeric keyboard, used to type majuscule and other alternate "upper" characters. There are typically two shift keys, on the left and right sides of the row below the home row....
). However, there does not appear to be any evidence that this has resulted in increased usage of square brackets over parentheses even in such situations.

Brackets

Curly brackets or braces
Curly brackets (also called braces, or "squiggly brackets") are sometimes used in prose to indicate a series of equal choices: “Select your animal 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
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
 they delimit sets. In many programming languages
Curly bracket programming language

Curly brace or bracket programming languages are those which use balanced brackets to make block s in their syntax or formal grammar, mainly due to being C -influenced....
, they enclose groups of statement
Statement (programming)

In computer programming a statement can be thought of as the smallest standalone element of an imperative programming language. A program is formed by a sequence of one or more statements....
s. Such languages are therefore called curly bracket languages. Some people use a curly brace to signify movement in a particular direction.

Presumably due to the similarity of the words brace and bracket (although they do not share an etymology
Etymology

Etymology is the study of the roots and history of words; and how their form and meaning have changed over time.In languages with a long detailed history, etymology makes use of philology, the study of how words change from culture to culture over time....
), many people casually treat brace as a synonym
Synonym

Synonyms are different words with identical or very similar meanings. Words that are synonyms are said to be synonymous, and the state of being a synonym is called synonymy....
 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.

Angle brackets, diamond 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 linguistics
Linguistics

Linguistics is the science study of natural language. Linguistics encompasses a number of sub-fields. An important topical division is between the study of language structure and the study of Meaning ....
, angle brackets indicate orthography
Orthography

The orthography of a language specifies the correct way of using a specific writing system to write the language. Orthography is derived from Greek language ????? orth?s and ???fe?? gr?phein ....
, as in “The English word is spelled .”

In textual criticism
Textual criticism

Textual criticism is a branch of literary criticism that is concerned with the identification and removal of transcription errors in the Writing of manuscripts....
, 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 ()
Guillemets

Guillemets , also called angle quotes, are line segments, pointed as if arrows , sometimes forming a complementary set of punctuation marks used as a form of quotation mark....
 (used as quotation mark
Quotation mark

Quotation marks or inverted commas are punctuation marks used in pairs to set off speech, a quotation, a phrase or a word. The pair consists of an opening quotation mark and a closing quotation mark, which may or may not be the same character....
s in many languages) when the proper glyph
Glyph

A glyph is an element of writing. Two or more glyphs representing the same symbol, whether interchangeable or context-dependent, are called allographs; the abstract unit they are variants of is called a grapheme or character ....
s are not available.

The mathematical or logical symbols for greater-than (>) and less-than (<) are inequality
Inequality

In mathematics, an inequality is a statement about the relative size or order of two objects, or about whether they are the same or not *The notation a < b means that a is less than b....
 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 URL
Uniform Resource Locator

In Information technology, a Uniform Resource Locator is a type of Uniform Resource Identifier that specifies where an identified resource is available and the mechanism for retrieving it....
s in text, such as “I found it on Example.com ”. It may also often be found to indicate an e-mail
E-mail

Electronic mail, often abbreviated as e-mail, email, E-Mail, or eMail, is any method of creating, transmitting, or storing primarily text-based human communications with digital communications systems....
 address, such as “This photo is copyrighted by John Smith ”, and is the computer-readable form for such in message headers
E-mail

Electronic mail, often abbreviated as e-mail, email, E-Mail, or eMail, is any method of creating, transmitting, or storing primarily text-based human communications with digital communications systems....
 as specified by RFC 2822. Furthermore, right-angle brackets are used in nested Usenet quoting
Usenet quoting

When Usenet and e-mail users respond to a message, they often want to include some context for the discussion. This is often accomplished by quoting a portion of the original message....
 and various e-mail formats, and as such are standard quotation mark glyphs
Quotation mark glyphs

Different typefaces, character encodings and computer languages use various encodings and glyphs for quotation marks. This article lists some of these glyphs along with their Unicode code points and HTML entities....
.

Chevrons are part of standard Chinese
Chinese language

Chinese or the Sinitic language is a language family consisting of language mutually unintelligible to varying degrees. Originally the indigenous languages spoken by the Han Chinese in China, it forms one of the two branches of Sino-Tibetan languages of languages....
, and Korean
Korean language

Korean is the official language of North Korea and South Korea. It is also one of the two official languages in the Yanbian Korean Autonomous Prefecture in People's Republic of China....
 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 book
Comic book

A comic book is a magazine or book of narrative artwork and dialog and descriptive prose. The style was introduced in 1934. Despite the term, comic books do not necessarily feature humorous subject-matter; in fact, it is often serious and action-oriented....
s, 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. or ), particularly in online, real-time text-based discussions (instant messaging, bulletin boards, etc). (Here, asterisks can also be used to signify an action.)

In the cartesian coordinate system brackets are used to specify the coordinates of a point: (2,3) denotes the point with x-coordinate 2 and y-coordinate 3.

The inner product of two vectors is commonly written as , but the notation (a, b) is also used.

Computing

  • Opening and closing parentheses correspond to ASCII
    ASCII

    American Standard Code for Information Interchange , is a coding standard that can be used for interchanging information, if the information is expressed mainly by the written form of English words....
     and Unicode
    Unicode

    Unicode is a computing industry standard allowing computers to consistently represent and manipulate Character expressed in most of the world's writing systems....
     character
    Character (computing)

    In computer and machine-based telecommunications terminology, a character is a unit of information that roughly corresponds to a grapheme, grapheme-like unit, or symbol, such as in an alphabet or syllabary in the written language form of a natural language....
    s 40 and 41, or U+0028 and U+0029, respectively.
  • For square brackets corresponding values are 91 and 93, or U+005B and U+005D.
  • For curly brackets, 123 and 125, or U+007B and U+007D.
  • True angle brackets are available in Unicode at code points U+27E8 and U+27E9 (for mathematical use) and or U+3008 and U+3009 (for East Asian languages). A third set of angle brackets are encoded at U+2329 and U+232A, but officially "discouraged for mathematical use" because they are canonically equivalent to the CJK code points U+300x and thus likely to render as double-width symbols.
  • The less-than and greater-than symbols can be found in both Unicode and ASCII at code points 60 and 62, or U+003C and U+003E.


These various bracket characters are frequently used in many computer languages as operators or for other syntax markup. The more common uses follow.

Uses of “(” and “)”
  • are often used to define the syntactic structure of expressions, overriding operator precedence: a*(b+c) has subexpressions a and b+c, whereas a*b+c has subexpressions a*b and c
  • contain the parameters
    Parameter (computer science)

    In computer programming, a parameter is a special kind of variable#In_computer_programming that refers to data that a subroutine receives to operate on....
     or arguments to functions, or may denote the invocation of a function or function-like construct: substring($val,10,1)
  • in Lisp
    Lisp programming language

    Lisp is a family of computer programming languages with a long history and a distinctive, fully parenthesized syntax. Originally specified in 1958, Lisp is the second-oldest high-level programming language in widespread use today; only Fortran is older....
    , they open and close s-expressions and therefore function applications: (cons a b)
  • in Fortran
    Fortran

    Fortran is a general-purpose programming language, procedural programming language, imperative programming language programming language that is especially suited to numerical analysis and scientific computing....
    -family languages, they are also used for array references
  • in the Perl
    Perl

    In computer programming, Perl is a high-level programming language, List of programming languages by category, Interpreter , dynamic programming language....
     programming language, they are used to define lists, static array-like structures; this idiom is extended to their use as containers of subroutine (function) arguments
  • in Python
    Python (programming language)

    Python is a general-purpose high-level programming language. Its design philosophy emphasizes code readability. Python's core syntax and semantics are Minimalism , while the standard library is large and comprehensive....
     they are used to disambiguate tuple
    Tuple

    In mathematics, a tuple is a sequence of a specific number of values, called the components of the tuple. These components can be any kind of mathematical objects, where each component of a tuple is a value of a specified type....
     (immutable
    Immutable object

    In object-oriented computer programming and Functional_programming programming, an immutable object is an object whose state cannot be modified after it is created....
     ordered lists) literals, which are usually formed by commas, in places where parentheses and commas would otherwise be a part of a function call.
  • in Tcl
    Tcl

    Tcl is a scripting language created by John Ousterhout. Originally "born out of frustration"?according to the author?with programmers devising their own languages intended to be embedded into applications, Tcl quickly gained wide acceptance on its own and is generally thought to be easy to learn, but powerful in competent hands....
     they are used to enclose the name of an element of an associative array
    Associative array

    An associative array is an abstract data type composed of a Collection of unique keys and a collection of values, where each key is associated with one value ....
     variable
  • used to make smiling or a frown face in chatting in instant messaging
    Instant messaging

    Instant messaging is a form of Real-time computing communication between two or more people based on typed text. The Written language is conveyed via devices connected over a network such as the Internet....
     or texting (See Emoticon
    Emoticon

    An emoticon is a textual portrayal of a writer's mood or facial expression. They are often used to alert a responder to the tenor or temper of a statement, and can change and improve interpretation of plain text....
    )


Uses of “[” and “]”
  • refer to elements of an array or associative array
    Associative array

    An associative array is an abstract data type composed of a Collection of unique keys and a collection of values, where each key is associated with one value ....
    , and sometimes to define the number of elements in an array: queue[3]
  • may be used to define a literal anonymous array or list: [5, 10, 15]
  • in most regular expression
    Regular expression

    In computing, regular expressions provide a concise and flexible means for identifying strings of text of interest, such as particular characters, words, or patterns of characters....
     syntaxes square brackets denote a character class: a set of possible characters to choose from
  • in Tcl
    Tcl

    Tcl is a scripting language created by John Ousterhout. Originally "born out of frustration"?according to the author?with programmers devising their own languages intended to be embedded into applications, Tcl quickly gained wide acceptance on its own and is generally thought to be easy to learn, but powerful in competent hands....
    , they enclose a sub-script to be evaluated and the result substituted
  • in Chemistry, [c] denotes the concentration of a particular substance - in this example, c.
  • in some of Microsoft's .NET
    .NET Framework

    The Microsoft .NET Framework is a software framework that is available with several Microsoft Windows operating systems. It includes a large Library of coded solutions to prevent common programming problems and a virtual machine that manages the execution of programs written specifically for the Software framework....
     (CLI
    Common Language Infrastructure

    The Common Language Infrastructure is an open specification developed by Microsoft that describes the executable code and runtime environment that form the core of a number of runtimes including the .NET Framework, Mono , and Portable.NET....
    ) languages, most notably C# and C++
    C++

    C++ is a general-purpose programming language. It is regarded as a middle-level language, as it comprises a combination of both high-level programming language and low-level programming language language features....
    , they are used to denote metadata attributes
    .NET metadata

    .NET metadata, in the Microsoft .NET framework, refers to certain data structures embedded within the Common Intermediate Language code that describes the high-level structure of the code....
    .
  • used to make emoticons in texting or instant messaging
    Instant messaging

    Instant messaging is a form of Real-time computing communication between two or more people based on typed text. The Written language is conveyed via devices connected over a network such as the Internet....


Uses of “”
  • are used in some programming languages to define the beginning and ending of blocks of code or data. Languages which use this convention are said to belong to the curly bracket family
    Curly bracket programming language

    Curly brace or bracket programming languages are those which use balanced brackets to make block s in their syntax or formal grammar, mainly due to being C -influenced....
     of programming languages
  • are used to represent certain type definitions or literal data values, such as a composite structure
    Composite type

    In computer science, composite types are datatypes which can be constructed in a programming language out of that language's basic primitive types and other composite types....
     or associative array
  • in math they enclose elements of a set and denote a set
  • in Curl they are used to delimit expressions
    Expression (programming)

    An expression in a programming language is a combination of value s, variables, operator s, and function s that are interpreted according to the particular Order of operations and of association for a particular programming language, which computes and then produces another value....
     and statements
    Statement (programming)

    In computer programming a statement can be thought of as the smallest standalone element of an imperative programming language. A program is formed by a sequence of one or more statements....
     (similar to Lisp's use of parenthesis).
  • in Pascal they define the beginning and ending of comments
    Comment (computer programming)

    In computer programming, a comment is a programming language construct used to embed programmer-readable annotations in the source code of a computer program....
  • in most regular expression
    Regular expression

    In computing, regular expressions provide a concise and flexible means for identifying strings of text of interest, such as particular characters, words, or patterns of characters....
     syntaxes, they are used as quantifiers, matching n repetitions of the previous group
  • in Perl
    Perl

    In computer programming, Perl is a high-level programming language, List of programming languages by category, Interpreter , dynamic programming language....
     they are also used to refer to elements of an associative array
  • in Tcl
    Tcl

    Tcl is a scripting language created by John Ousterhout. Originally "born out of frustration"?according to the author?with programmers devising their own languages intended to be embedded into applications, Tcl quickly gained wide acceptance on its own and is generally thought to be easy to learn, but powerful in competent hands....
     they enclose a string to be substituted without any internal substitutions being performed
  • in mIRC
    MIRC

    mIRC is an Internet Relay Chat client for Microsoft Windows, created in 1995 and developed by Khaled Mardam-Bey. Although it is a fully functional chat utility, its mIRC scripting language makes it extensible and versatile....
     slang, two braces with the enclosing one first represent a kiss: }* in Python they are used for dictionaries
  • in LaTeX
    LaTeX

    LaTeX is a document markup language and Word processor for the TeX typesetting program. Within the typesetting system, its name is styled as ....
     they group parts sharing the same local format or wrap parameters


Uses of “<” and “>”
In computing, the less-than and greater-than symbols are sometimes used with a bracket-like function. When these symbols are used in pairs as if they are brackets,
  • in SGML
    Standard Generalized Markup Language

    The Standard Generalized Markup Language is an International Organization for Standardization Standard metalanguage in which one can define markup languages for documents....
     (and its applications and variants such as HTML
    HTML

    HTML, an Acronym and initialism of HyperText Markup Language, is the predominant markup language for Web pages. It provides a means to describe the structure of text-based information in a document?by denoting certain text as links, headings, paragraphs, lists, and so on?and to supplement that text with interactive forms, embedded '...
     and XML), used to enclose code tags: <div>
  • in C++
    C++

    C++ is a general-purpose programming language. It is regarded as a middle-level language, as it comprises a combination of both high-level programming language and low-level programming language language features....
    , C#, and Java
    Java (programming language)

    Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java ....
     they delimit generic arguments
    Generic programming

    Generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters and was pioneered by Ada which appeared in 1983....
  • when writing text that contains e-mail address
    E-mail address

    An e-mail address identifies a location to which e-mail messages can be delivered. An e-mail address on the modern Internet looks like, for example, jsmith@example.com and is usually read as "jsmith at example dot com"....
    es or URIs
    Uniform Resource Identifier

    In Information technology, a Uniform Resource Identifier is a Character string of Character s used to Identifier or name a Resource on the Internet....
     they delimit the canonical address part from any surrounding textual content, especially when ambiguities may otherwise arise.
  • in Perl they are used to read a line from an input source.
  • in ABAP
    ABAP

    ABAP is a high level programming language created by the Germany software company SAP AG. It is currently positioned, alongside the more recently introduced Java_, as the language for programming SAP's SAP Web Application Server, part of its NetWeaver platform for building business applications....
     they denote field symbols - placeholders or symbolic names for other fields, which can point to any data object.
  • used to communicate in thought-speak


When not used in pairs to delimit text (not acting as brackets),
  • the less-than and greater-than signs (possibly in combination with other punctuation marks) are common relational operator
    Relational operator

    In computer science a relational operator is a programming language construct or Operator that tests some kind of relation between Binary function....
    s; in some languages the pair together as <> denotes an inequality
    Inequality

    In mathematics, an inequality is a statement about the relative size or order of two objects, or about whether they are the same or not *The notation a < b means that a is less than b....
     comparison
  • when doubled as << or >> they may represent bit shift
    Bitwise operation

    In computer programming, a bitwise operation operates on one or two bit patterns or Binary numeral system at the level of their individual bits....
     operators, or in C++ also as stream input/output operators
  • are operators for indicating the redirection of input/output
    Input/output

    In computing, input/output, or I/O, refers to the communication between an information processing system , and the outside world ? possibly a human, or another information processing system....
     in various command shells
    Shell (computing)

    In computing, a shell is a piece of software that provides an Interface for users. Typically, the term refers to an operating system shell which provides access to the services of a kernel ....
    .


Layout styles
In normal writing (prose) an opening bracket is rarely left hanging at the end of a line of text nor is a closing bracket permitted to start one. However, in computer code this is often done intentionally to aid readability. For example, a bracketed list of items separated by semicolons may be written with the brackets on separate lines, and the items, followed by the semicolon, each on one line.

For example, the CSS
Cascading Style Sheets

Cascading Style Sheets is a stylesheet language used to describe the presentation of a document written in a markup language. Its most common application is to style web pages written in HTML and XHTML, but the language can be applied to any kind of XML document, including Scalable Vector Graphics and XUL....
 code h1 may also be written h1

A common error in programming is mismatching braces; accordingly, many IDEs have braces matching to highlight matching pairs.

Mathematics

In addition to the use of parentheses
Bracket

Brackets are punctuation marks used in pairs to set apart or interject text within other text. In computer science, the term is sometimes said to strictly apply to the square or box type....
 to specify the order of operations
Order of operations

In algebra and computer programming, when a number or expression is both preceded and followed by an operator such as minus or multiplication, a rule is needed to specify which operator should be applied first; this rule is known as a precedence rule, or more informally order of operation....
, both parentheses and square brackets are used to denote an interval
Interval (mathematics)

In mathematics, a interval is a set of real numbers with the property that any number that lies between two numbers in the set is also included in the set....
. The notation [a, c) is used to indicate an interval from a to c that is inclusive of a but exclusive of c. That is, [5, 12) would be the set of all real numbers between 5 and 12, including 5 but not 12. The numbers may come as close as they like to 12, including 11.999 and so forth (with any finite
Finite set

In mathematics, finite set is a Set that has a finite number of element . For example,is a finite set with five elements. The number of elements of a finite set is a natural number , and is called the cardinality of the set....
 number of 9s), but 12.0 is not included. In Europe, the notation [5,12[ is also used for this. The endpoint adjoining the square bracket is known as closed, while the endpoint adjoining the parenthesis is known as open. If both types of brackets are the same, the entire interval may be referred to as closed or open as appropriate. Whenever infinity
Infinity

Infinity comes from the Latin infinitas or "unboundedness." It refers to several distinct concepts – usually linked to the idea of "without end" – which arise in philosophy, mathematics, and theology....
 or negative infinity is used as an endpoint, it is normally considered open and adjoined to a parenthesis. See Interval (mathematics)
Interval (mathematics)

In mathematics, a interval is a set of real numbers with the property that any number that lies between two numbers in the set is also included in the set....
 for a more complete treatment.

In quantum mechanics
Quantum mechanics

Quantum mechanics is a set of principles underlying the most fundamental known description of all physical systems at the microscopic scale . Notable amongst these principles are both a dual wave-like and particle-like behavior of matter and radiation, and prediction of probabilities in situations where classical physics predicts certaintie...
, angle brackets are also used as part of Dirac’s
Paul Dirac

Paul Adrien Maurice Dirac, Order of Merit , Royal Society was a United Kingdom theoretical physicist. Dirac made fundamental contributions to the early development of both quantum mechanics and quantum electrodynamics....
 formalism, bra-ket notation
Bra-ket notation

Bra-ket notation is a standard notation for describing quantum states in the theory of quantum mechanics composed of bracket and vertical bars....
, to note vectors from the dual space
Dual space

In mathematics, any vector space, V, has a corresponding dual vector space consisting of all linear functionals on V. Dual vector spaces defined on finite-dimensional vector spaces can be used for defining tensors which are studied in tensor algebra....
s of the Bra . Mathematicians will also commonly write <a,b> for the inner product of two vectors. In statistical mechanics, angle brackets denote ensemble or time average. Angle brackets are used in group theory
Group theory

In mathematics and abstract algebra, group theory studies the algebraic structures known as group .The concept of a group is central to abstract algebra: other well-known algebraic structures, such as ring , field , and vector spaces can all be seen as groups endowed with additional operations and axioms....
 to write group presentations, and to denote the subgroup generated by a collection of elements.

In group theory
Group theory

In mathematics and abstract algebra, group theory studies the algebraic structures known as group .The concept of a group is central to abstract algebra: other well-known algebraic structures, such as ring , field , and vector spaces can all be seen as groups endowed with additional operations and axioms....
 and ring theory
Ring theory

In mathematics, ring theory is the study of ring , algebraic structures in which addition and multiplication are defined and have similar properties to those familiar from the integers....
, square brackets denote the commutator
Commutator

In mathematics, the commutator gives an indication of the extent to which a certain binary operation fails to be commutative. There are different definitions used in group theory and ring theory....
. In group theory, the commutator [g,h] is commonly defined as g−1h−1gh. In ring theory, the commutator [a,b] is defined as abba. Furthermore, in ring theory, braces denote the anticommutator
Commutator

In mathematics, the commutator gives an indication of the extent to which a certain binary operation fails to be commutative. There are different definitions used in group theory and ring theory....
 where is defined as ab + ba. The square bracket is also used to denote the Lie derivative
Lie derivative

In mathematics, the Lie derivative, named after Sophus Lie by Wladyslaw Slebodzinski, evaluates the change of one vector field along the flow of another vector field....
, or more generally the Lie bracket in any Lie algebra
Lie algebra

In mathematics, a Lie algebra is an algebraic structure whose main use is in studying geometric objects such as Lie groups and differentiable manifolds....
.

Various notations, like the vinculum have a similar effect to brackets in specifying order of operations, or otherwise grouping several characters together for a common purpose.

In the Z
Z notation

The Z notation , named after Zermelo-Fr?nkel set theory ? J.R. Abrial answers the question "Why Z?" with "Because it is the ultimate language!" ? , is a Formal specification specification language used for describing and modeling computing systems....
 formal specification
Formal specification

In computer science, a formal specification is a mathematics description of software or hardware that may be used to develop an implementation. It describes what the system should do, not how the system should do it....
 language, curly braces define a set and angle brackets define a sequence.

Accounting

Traditionally in accounting
Accountancy

Accountancy or accounting is the system of recording, verifying, and reporting of the value of assets, liabilities, income, and expenses in the books of account to which debit and credit entries are chronologically posted to record changes in value ....
, negative amounts are placed in parentheses.

Law

Brackets are used in the citation of law report
Law report

Law reports or reporters are series of books that contain Legal opinion from a selection of case law decided by court. When a particular judicial opinion is referenced, the law report series in which the opinion is printed will determine the case citation format....
s to identify parallel citations to non-official reporters. For example: Chronicle Pub. Co. v. Superior Court
Superior court

In common law systems, a superior court is a court of general competence which typically has unlimited jurisdiction with regard to civil and criminal legal cases....
, (1998) 54 Cal.2d 548, [7 Cal.Rptr. 109].

When quoted material is in any way altered, the alterations are enclosed in brackets within the quotation. For example: Plaintiff asserts his cause is just, stating, “[m]y causes is [sic] just.” While in the original quoted sentence the word “my” was capitalized, it has been modified in the quotation and the change signalled with brackets. Similarly, where the quotation contained a grammatical error, the quoting author signalled that the error was in the original with “[sic]” (Latin for “thus”). (California Style Manual, section 4:59 (4th ed.))

Sports

Tournament brackets
Bracket (tournament)

A bracket is the diagrammatic representation of the series of games played during a tournament, named as such because it appears to be a large number of interconnected brackets....
, the diagrammatic representation of the series of games played during a tournament usually leading to a single winner, are so named for their resemblance to square or curly brackets.

Typing

In roleplaying
Roleplaying

Roleplaying refers either to the unconscious changing of one's behavior to assume a social role or roles in life or to the conscious adoption and Acting out of roles, both fictional and real world....
, and writing, brackets are used for out-of-speech sentences (otherwise known as OOC, Out-Of-Character). Example:
(What's your name?)


Also in roleplaying, it is usually preferred to use double parenthesis for OOC, due to single parenthesis generally being what the character is thinking.

See also

  • Emoticon
    Emoticon

    An emoticon is a textual portrayal of a writer's mood or facial expression. They are often used to alert a responder to the tenor or temper of a statement, and can change and improve interpretation of plain text....
  • Japanese typographic symbols
    Japanese typographic symbols

    This page lists Japanese typographic symbols which are not included in kana or kanji.The links in the Unicode column lead to the Unihan database....


Bibliography


States that what are depicted as square brackets above are called braces and curly brackets are called brackets. This was the terminology in US printing prior to computers.