This seems like an absurdly simply question, and is possibly below the level of this forum, but it seems the most sensible place.
I'm building an arithmetic equation parser, and currently working on parsing + and - operations. I know that (leaving other operations and brackets aside for the time being) they should be processed from left to right, but it seems very much like processing the minuses first (left to right), then the pluses, has the same effect.
i.e.
$1+2-3+4-5$
(left to right): $$1+2-3+4-5 \\ =3-3+4-5 \\ =0+4-5 \\ =4-5 \\ =-1$$
(minuses first): $$1+2-3+4-5 \\ =1+(-1)+4-5 \\ =1+(-1)+(-1) \\ =0+(-1) \\ =-1$$
Is this guaranteed to hold true in all cases? And why is it so?