I’ve come across what seems to be odd behaviour in some of my mathematical expressions. I’m not sure if it’s a bug or a feature because I know what it’s doing, it just seems really odd to me that it’s doing it.
As a quick test you can run this in the workbench.
-1-2-3 //result 0
-1-2+3 //result -6
[-1-2]-3 //result -6
-1-2-3-4 //result -4
[[-1-2]-3]-4 //result -10
[[-1-2]-3-4] //result -2
Is that the expected behaviour? I would have thought would use normal (at least what i considered normal) on paper order of operations for arithmetic expressions but it seems like the sign is being carried forward as a multiplication to the successive term?
If this is expected behaviour, I’m curious about the reasoning.
Cheers and thanks!