Bracket

This is an old revision of this page, as edited by Patrick (talk | contribs) at 09:01, 19 February 2003. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Brackets are punctuation marks, used in pairs to set apart or interject text within a written text. Examples of brackets include parentheses ( ), square brackets [ ], angle brackets < >, and braces { }, also called curly brackets. All these brackets may be used in typographical conventions that may vary from publication to publication. Some typical uses follow.

Parentheses are used to contain parenthetical (or optional, additional) material in a sentence that could be removed without destroying the meaning of the main text. For example, "George Washington (the father of his country) was not the wooden figure with wooden teeth that many think him." In fact, such an interjection is called a parenthesis, and may also be set off with dashes or commas.

Parentheses are also used to add supplementary information, such as "Sen. Kennedy (D., Massachusetts) spoke at length."

Parentheses may also be nested (with one set inside another set (but this is not commonly used in formal writing)).

Any punctuation inside parentheses or other brackets is independent from the rest of the text. "Mrs. Pennyfarthing (What? Yes, that was her name!) was my landlady."

In several programming languages parentheses are used to contain the arguments to functions: substring($val,10,1).

Parentheses are so fundamental in LISP that the name of the language is said to be an acronym for "Lots of Irritating Superfluous Parentheses".

Square brackets are used to 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] (Latin for "thus") is used to indicate errors that are "thus in the original"; ellipses [...] are used to indicate deleted material; bracketed comments are used to indicate when original text has been modified: "I'd like to thank [several unimportant people] and my parentals [sic] for their love, tolerance [...] and assistance [italics added]."

In several programming languages, square brackets are used to define elements in an array: $animals["goat"].

Braces are used in specialized ways in poetry and music (to mark repeats or joined lines), and sometimes used in conventional text to indicate a series of equal choices. "Select your animal {goat, sheep, cow, horse} and follow me." In several programming languages, braces, or curly brackets, are used to define the beginning and ending of blocks of code.

Angle brackets (<,>) are often used to enclose highlighted material, such as URLs in text, such as "I found it in the Wikipedia <www.wikipedia.com>." Double angle brackets (<<,>>) are sometimes used as quotation mark. Angle brackets, unlike the others, are also used individually, as the mathematical or logical symbols for greater-than (>) and less-than (<).

Angle brackets are used in HTML to enclose code tags.

Other names

Parentheses are sometimes called round brackets, or, colloquially, parens, or fingernails. Square brackets are called crochets in Great Britain. John Lennard (in "The exploitation of parentheses in English printed verse") usefully coined the term lunula to refer specifically to the opening curved bracket, the closing curved bracket and the textual contents between.

Braces are called curly brackets in the Unicode standard, and curly brackets is a synonym for braces. Where absolute clarity is called for, such as in programming situations, it may be best to use the expression curly brackets rather than braces, but general usage in English favors the latter form. The redundant term curly braces is careless since that is the only kind of braces there are.