Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Bracket
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Uses of { }<span class="anchor" id="Uses of curly brackets"></span>=== [[File:Curly Bracket Notation.png|thumb|upright=0.5|left|An example of curly brackets used to group sentences together]] Curly brackets are used by text editors to mark editorial insertions<ref>{{cite book |url=https://books.google.com/books?id=ypA27dtL0-oC&pg=PA6 |page=6 |title=Medieval Hebrew Poetry in Muslim Egypt: The Secular Poetry of the Karaite Poet Moses Ben Abraham Dar'i |series=Karaite Texts and Studies |volume=3 |editor1-first=Joachim J.M.S. |editor1-last=Yeshaya |publisher=Brill |year=2010 |isbn=9789004191303}}</ref> or interpolations.<ref>{{cite book |url=https://books.google.com/books?id=9yG9ZB0waQsC&pg=PA1053 |page=1053 |title=Textual Evidence and Commentary |volume=5 |series=The Collected Poetry of Robinson Jeffers |editor1-first=Tim |editor1-last=Hunt |publisher=Stanford University Press |year=1988 |isbn=9780804738170}}</ref> Braces used to be used to connect multiple lines of poetry, such as triplets in a poem of rhyming [[couplet]]s,<ref>{{cite book |url=https://books.google.com/books?id=0eRtOqjNMxEC&pg=PA122 |page=122 |title=The Poetry Handbook |first=John |last=Lennard |edition=2 |publisher=Oxford University Press |location=Oxford |year=2006 |isbn=9780191532733}}</ref> although this usage had gone out of fashion by the 19th century.{{sfn|Robertson|1785|p=143}}{{sfn|Wilson|1850|p=165}} Another older use in prose was to eliminate duplication in lists and tables.{{sfn|Wilson|1850|p=165}} Two examples here from [[Charles Hutton]]'s 19th century table of weights and measures in his ''A Course of Mathematics'': <blockquote style="border:1px solid; padding:0.5em;"> {| cellpadding=0; cellspacing=0; |+ In this kingdom{{sfn|Hutton|1836|p=18}} |- | rowspan="5" | The standard of ... || rowspan="5" style="vertical-align:middle" | <div style="display:inline-block;line-height:1.25em;"> <span style="display:block">⎧</span> <span style="display:block">⎪</span> <span style="display:block">⎨</span> <span style="display:block">⎪</span> <span style="display:block">⎩</span> </div> || Length is a Yard. |- | Surface is a Square Yard, the {{frac|1|4840}} of an Acre. |- | ⎰ Solidity is a Cubic Yard. |- | ⎱ Capacity is a Gallon. |- | Weight is a Pound. |} </blockquote> <blockquote style="border:1px solid; padding:0.5em;"> {| cellpadding=0; cellspacing=0; |+ Imperial measure of CAPACITY for coals, culm, lime, fish, potatoes, fruit,– and other goods commonly sold by ''heaped measure'':{{sfn|Hutton|1836|p=20}} |- | 2 Gallons || = 1 Peck || = 764 || ⎱ | rowspan = "2" | Cubic Inches, nearly |- | 8 Gallons || = 1 Bushel || = {{frac|2813|1|2}} || ⎰ |- | 3 Bushels || = 1 Sack || = {{frac|4|8|9}} || ⎱ | rowspan = "2" | Cubic Feet, nearly |- | 12 Sacks || = 1 Chald. || = {{frac|58|2|3}} || ⎰ |} </blockquote> As an extension to the [[International Phonetic Alphabet]] (IPA), [[International Phonetic Alphabet#Brackets and transcription delimiters|braces are used for prosodic notation]]. ====Music==== In music, they are known as "[[Accolade (notation)|accolades]]" or "[[Brace (music)|braces]]", and connect two or more lines (staves) of music that are played simultaneously.<ref>{{cite web |url= http://www.decodeunicode.org/u%2B007B |title=U+007B LEFT CURLY BRACKET |website=DecodeUnicode.org |access-date=3 May 2009 |archive-url= https://web.archive.org/web/20081202121802/http://www.decodeunicode.org/u%2B007B |archive-date=2 December 2008}}</ref> ==== Chemistry ==== The use of braces in chemistry is an old notation that has long since been superseded by subscripted numbers.{{sfn|Watts|1877|pp=140–141}} The chemical formula for water, H<sub>2</sub>O, was represented as <math>\left . {{H}\atop{H}} \right \} O</math>.{{sfn|Watts|1877|pp=140–141}} {{clear left}} ====Curly brackets in programming languages==== {{See also|Bracing style}} In many programming languages, curly brackets enclose groups of [[Statement (programming)|statement]]s and create a local [[Scope (computer science)|scope]]. Such languages ([[C (programming language)|C]], C#, C++ and many others) are therefore called [[curly bracket language]]s.<ref>{{cite web|url= http://www.riedquat.de/prog/style |title=Brace and Indent Styles and Code Convention |work=Programming with Style |via=Riedquat.de |archive-url= https://web.archive.org/web/20150924070732/http://www.riedquat.de/prog/style |archive-date=24 September 2015}}</ref> They are also used to define structures and [[enumerated type]] in these languages. In various [[Unix shell]]s, they enclose a group of strings that are used in a process known as ''brace expansion'', where each successive string in the group is interpolated at that point in the command line to generate the command-line's final form.{{sfn|Newham|Rosenblatt|1998|p=14}} The mechanism originated in the [[C shell]] and the string generation mechanism is a simple interpolation that can occur anywhere in a command line and takes no account of existing filenames.{{sfn|Sobell|Seebach|2005|p=323}} In [[syntax diagram]]s they are used for repetition, such as in [[extended Backus–Naur form]]. In the [[Z notation|Z]] [[formal specification]] language, braces define a set. ====Curly brackets in mathematics==== {{main|Glossary of mathematical symbols#Braces}} In [[mathematics]] they delimit [[Set (mathematics)|set]]s, in what is called ''set notation''.{{sfn|Biggs|2002}} Braces enclose either a literal list of set elements, or a rule that defines the set elements.{{sfn|Biggs|2002}} For example: *{{math|1=S = <nowiki>{</nowiki>{{mvar|a}}, {{mvar|b}}<nowiki>}</nowiki>}} defines a set {{mvar|S}} containing {{mvar|a}} and {{mvar|b}}.{{sfn|Biggs|2002}} *{{math|1=S = <nowiki>{</nowiki>{{mvar|x}} <nowiki>|</nowiki> {{mvar|x}} > 0<nowiki>}</nowiki>}} defines a set {{mvar|S}} containing elements (implied to be numbers) {{math|{{mvar|x}}<sub>0</sub>}}, {{math|{{mvar|x}}<sub>1</sub>}}, and so on where every {{math|{{mvar|x}}<sub>{{mvar|n}}</sub>}} satisfies the rule that it is greater than zero.{{sfn|Biggs|2002}} They are often also used to denote the [[Poisson bracket]] between two quantities. In [[ring theory]], braces denote the [[anticommutator]] where {{math|<nowiki>{</nowiki>{{mvar|a}}, {{mvar|b}}<nowiki>}</nowiki>}} is defined as {{math|{{mvar|a}} {{mvar|b}} + {{mvar|b}} {{mvar|a}} }}. {{Wiktionary pipe|curly bracket||brace||Unsupported titles/Curly brackets|<nowiki>{ }</nowiki>|Unsupported titles/Right curly bracket|<nowiki>{</nowiki>|Unsupported titles/Left curly bracket|<nowiki>}</nowiki>|squiggly||accolade|}} {{clear}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)