So, I want to give the answer of { [ 4+(3+2)]} I already have this in a String, but when i tried to use DataTable, it give me error.. Or another way to calculate it with the { } [ ] Thanks
Asked
Active
Viewed 427 times
0
-
1From my understanding braces and brackets just more ordering to the expression. Do you have an example of an expression that can't be done with just parenthesis? – tinstaafl Nov 02 '16 at 04:48
-
Mmm... you are right! Will change the {} [] with () thanks! :D – albita Nov 02 '16 at 05:02
1 Answers
1
When evaluating simple arithmetic expressions, []
or {}
are just a notational variant of ()
to make matching parentheses easier. So you could simply replace them by ()
and then proceed with that.
There are many corners in Mathematics where these symbols would mean completely different things, e.g. []
for floor, equivalence class, vector, … or {}
for fractional part, set, … So it would be wrong to say that any mathematical expression retains its semantics by the above replacement. Be sure you know what kinds of expressions you're dealing with.

MvG
- 57,380
- 22
- 148
- 276