Curly bracket programming language: Difference between revisions

Content deleted Content added
History: Fixed factual errors in material.
Gazpacho (talk | contribs)
History: copyedit
Line 2:
 
== History ==
Curly-bracket stylesyntax goes way back beforepre-dates C. [[BCPL]] was the first language to use a curly bracketbrackets style, forto outliningoutline multi-statement function bodies. [[Ken Thompson]] gaveused the feature morein glory inhis [[B programming language|B]]. Because [[C programming language|C]] was initially designed after B, Cit has retained the bracket stylesyntax of B., Manyas languageshave thatmany camesubsequent after Clanguages ([[C++]], [[Java (programming language)|Java]], [[JavaScript]] and its generalized standard [[ECMAScript]], [[C Sharp|C#]], [[D (programming language)|D]], etc.) keep the style. [[Pico programming language|Pico]] is a non-C descendant that also uses this style.
 
One common part of curly bracket style is the common style of terminating a statement with a semicolon (;), which is one way for languages to ignore whitespace. BCPL and Pico, do not have this rule. Thus a newline is used as a statement terminator in such languages. The [[Pico indent style]] is then used, as below (BCPL):