Title is most of the question, what allows this to be valid code? Is there any benefit or trick that would allow me to utilize this?
What was the rational on adding positive indicators?? Anyone have any insight to this?
Dested
2010-03-27 07:41:40
so it's 6 + really really very positive 6?
Mike Two
2010-03-27 07:44:21
@Dested: Rationale? Rationale? The inmates run that asylum, my friend. If anything, it would be symmetry.
2010-03-27 07:46:24
@Mike Two: Yes. As positive as you can get without adding another plus sign.
2010-03-27 07:46:44
can you do the same thing with minus ( 6 - - - - - - 6) ?
Thilo
2010-03-27 07:47:18
@Thilo: Apparently... but with a less stable effect, obviously.
2010-03-27 07:55:33
@Dested: Some ideas on rationale here: http://stackoverflow.com/questions/727516/what-does-the-unary-plus-operator-do
AakashM
2010-03-27 08:51:56
+12
A:
The unary plus operator has higher precedence than the addition operator, just split your expression into multiple grouped expressions and it will seem pretty obvious:
var m = 6 + ( +( +( +( +( +( +( +( 6 ))))))));
//6 + 6
CMS
2010-03-27 07:46:47