I believe I have identified a (pretty obvious) bug while incrementing a variable which has been created using FCalc. If I want to add 1 to a variable x, is there any other way than using fc x = x+1 or fc x = (x+1)? The += operator is not supported I noticed, so I figured this was the way to go. However, the variable x actually gets the value x+2.
1. Launch FCalc using its regex
2. Type 'x = 0'
3. Type 'x = (x+1)'
4. Type 'x' to see the result.
The result is supposed to be 1, but instead is 2. This happens all the time.
I think part of the bug is the fact you can alter variables *without* pressing the enter key. For example, I can type:
1. 'x = 0' [ENTER]
2. 'x = 5' // But then remove the line using backspace, perhaps I made an error. I *did not* press [ENTER] here.
Now, however, x *did* in fact change to 5. Which, imho, it should *not* do.
It seems if I want to increment integer x with the constant n using the notation x = (x+n), it is somehow parsed to x = x + 2n. In the case of incrementing by 1, this results in an increment by 2. If I increment by 10, however, x will be incremented by 20 instead.