mplekunov / CalculatorApp

GNU General Public License v3.0
1 stars 0 forks source link

Negative Numbers representation after "saving" result #20

Closed mplekunov closed 2 years ago

mplekunov commented 2 years ago

Current implementation of negative numbers assumes that we consider "-" sign (in front of the number) as Operator... However, when we calculate result which gives us negative number, we receive " negative" number as a whole number with "-" sign inside of it...

I think it will be possible to fix it through "conversion" of the result... For instance, we can check if the number that returns is negative... If it is we can divide it on two Tokens, "-" operator and number itself.