Numbered Steps to Reproduce Problem:
Go to the DM Reference here...
http://www.byond.com/docs/ref/info.html#/operator/--
Code Snippet (if applicable) to Reproduce Problem:
var/A = 0
world << "A-- = [A--]" // outputs "A = 0"
world << "--A = [--A]" // outputs "A = -2"
Expected Results:
It to show the real output completely instead of telling the value of A.
Actual Results:
The DM Reference shows most of the output but not the exact output.
Does the problem occur:
Every time? Or how often?Every Time
In other games?Not Applicable
In other user accounts?Not Applicable
On other computers?Not Applicable
When does the problem NOT occur?Always
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Not Applicable
Workarounds:Not Applicable
My simple proposal here is a few things...first off the output would be exactly as follows...
var/A = 0
world << "A-- = [A--]" // outputs "A-- = 0"
world << "--A = [--A]" // outputs "--A = -2"
But it's somewhat mis-leading to people just glancing at it, because the double use of the same operator.
After line 2, it would output 0, yes, but A would now be negative 1, and for line 3 negative 1 minus one more is indeed negative 2, but if someone just glances for an example of each as if their separate, which they for all general purposes are, they may wonder why the 3rd line says negative 2 if A is 0, even though line 2 made that not so.
Since as all of us now, but not beginners which will be using the reference know, since the 2nd --A has the []'s around it, it makes it evaluate it and do something where-as ones outside of it don't...I have been asked a few times now why it's negative 2 or why after line 2, A is only negative 1, as the output not showing the exact output makes it more mis-leading to people looking thinking it's evaluating both of them, and leaving the A to display after the subtraction...even though that's not accurate.
No big deal, I think the reference should split the examples in the operator's reference & use the exact output so it doesn't fool them into thinking it's evaluating & subtracting from both of the --A's even though only one is the []'s
Link to the other operator: http://www.byond.com/docs/ref/info.html#/operator/++