2023-10-16 06:27 UTC
2/11
I got sent down the garden path by someone, who made a (false) claim about the rules changing 100 years ago, because they were calling Terms "Expressions" - didn't realise for ages! Thanks for nothing (sigh, but at least that's been debunked now). See my posts about Lennes' letter, which start at https://dotnet.social/@SmartmanApps/110965810374299599
Next, addition and subtraction are unary operators. i.e. they are only associated with 1 number, the number that follows it...
Replies (1)
-
@SmartmanApps@dotnet.social 2023-10-16 06:28
3/11 ...and note that it's the number that follows it. i.e. in the expression 6-5+2, the minus sign is associated with the 5, NOT the 6, hence left associativity - a term is associated with whatever sign is on it's left (and of course the 6 is associated with a +, but we don't normally write + at the start of an expression, only if it's a -, and even that we try to avoid. i.e. if we had an expression -a+b, we would usually write it as b-a)...