Use of [], rather than ()

How, in usage, are and () different?

In usage of what? Should this be in another forum?

Well, in C and C++, square brackets are used in arrays but parentheses are used in function calls.

The square brackets are useful for inserting explanatory words into a direct quote. For example:

The newspaper stated, “The suspect [Mr. Jones] was arraigned on Tuesday.”

Some styles also use the bracket as a second-order parenthesis (that is, a parenthesis within a parenthesis [if you know what I mean]).

What forum should it be in, then? :dubious:

I’m talking about correct punctuation usage, such as if you were to use a . to end a sentence, or use a ! to show excitement.

Following up on what nineiron posted, a more general rule would be that you use parens to enclose an insertion you make into your own words and brackets to enclose an insertion into somebody else’s words.

From the Chicago Manual of Style (13th edition):

There are many more specialized usages of each as well.

Square brackets, round brackets, curly brackets, angle brackets… a plethora of brackets! :slight_smile:

You can also use brackets [ ] to enclose the Latin word sic when quoting something accurately which just happens to have an error in it. By saying “sic” you are saying that you are quoting exactly, but that the error occurred in the original material and that it is not yours.

Square brackets are also used in an editorial context to clarify or correct: “…[S]he said that [the perpetrators] were convicted.” when the original quote read “she said that they were convicted.”

I tend to use parentheses for parenthetical remarks (I do this a lot), and square brackets to delimit a [discrete entity that is described by more than one word].

I was just going over format today with students, and the newer textbooks now say that [ ] should be placed around ellipsis. Back in my day, we never used brackets for that purpose.
Any thoughts on this?

When doing calculations, one often uses brackets to enclose the units (for clarity).

e.g.

3*10^8 [m/s]
---------------------- = f [Hz]
.5 [m]

Brackets around elipsis? Never heard of it[…] Sounds weird[…]

Brackets for editorializing [nobody here is going to know what that means] even if it’s your own words, i.e. to set aside notes to yourself that you know you will remove later.

Apple ][ computers used square brackets in the wrong order to make a really cool Roman numeral two.

Lots of computer languages use and () and {} and even <> as delimiters, grouping means, to show functions, or to show array indices, or comments, etc etc.

You use brackets around an ellipsis when you’re editing an original quote: “Congress shall make no law […] abridging the freedom […] to petition the government for a redress of grievances.”

That just looks odd to me. I’d almost read that as if the author were stating that he was speechless over that line, as opposed to saying that he had removed a portion.

I seem to remember something from high school algebra…

When dealing with sets, detotes a range of all values, inclusive, while ( ) denotes a range of all values EXclusive

In fact, that’s about the only time you can open and close with different brackets. In all other cirumstances you have (…) or […] but you can write [0,1) to mean all numbers >=0 and <1.

What about in math when you have something like:

7[5(x + 2) + (9x^2 +7)]

?

xvxdarkknightxvx, your example still consists of two matched left-and-right pairs of parentheses, nested within a matching left-and-right pair of brackets. I think that Shade was referring to the unusual case where you can correctly use a left bracket or parenthesis without pairing it with a right, or vice versa, or without pairing it with another bracket or parenthesis at all.