Content deleted Content added
No edit summary |
m Reverted edits by 67.190.31.201 (talk) to last version by Mipadi |
||
Line 2:
== History ==
Curly-bracket syntax pre-dates C. [[BCPL]] was the first language to use curly brackets to outline multi-statement function bodies. [[Ken Thompson]] used the feature in his [[B programming language]]. Because [[C (programming language)|C]] was initially designed after B, it has retained the bracket syntax of B, as have many subsequent
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.
LET FUNC foo(a) = VALOF
Line 35:
'''}'''
There are many other ways to identify statement blocks, such as ending keywords that may match beginning keywords (in [[Ada (programming language)|Ada]], [[Pascal (programming language)|Pascal]], [[REXX]], and [[Visual Basic]]), the [[Off-side rule]] of indentation (in [[Python (programming language)|Python]]), or other symbols such as parentheses (in [[Lisp programming language|Lisp]]). These ways are not necessarily exclusive: whereas
=== Loops ===
Line 119:
=== Problems ===
Some 7 bit national [[ISO646]] sets redefine curly brackets to characters that make programs hardly readable on such designed terminals. To address this problem, [[ANSI C]] introduced ''[[C trigraph|trigraph]]s'' that can be used instead of such problematic characters
==Languages==
|