Thursday, December 15, 2011

Braces Vs Brackets

In writing, it is often unclear when to use braces or brackets to separate information in a sentence. They seem to be used interchangeably, which causes the confusion; however, there are rules that help eliminate the uncertainty.


Braces Group Statements


Braces group statements, declarations, loops and control structures.


Braces Enclose Comments


Braces also enclose comments, coding, chemical formulas, method bodies, constructor bodies, class contents and interfaces.


Braces Seldom Used


Braces are used to enclose numerical sets and to indicate choices and are seldom used in formal writing.


Brackets Enclose Arrays


Brackets enclose arrays (systematic arrangement of objects) of information, isotopic prefixes such as [3H] and enclose chemical concentrations such as [CA2+].


Brackets Clarify


Brackets are also used for clarification along with quotation marks and inside of parenthetical information.


Brackets Indicate Errors


Use brackets to indicate errors in and to revise quotes, and to indicate the origin of words.

Tags: