I’m currently working on fixing a bug in my calculator logic, specifically in the equal function. The issue seems to be related to how numbers and operators are being processed and evaluated.
Right now, when I press the equal button, the function doesn’t consistently return the correct result. Sometimes it fails to compute the expression properly, especially when multiple operators are involved or when chaining operations.
I suspect the problem lies in how I’m storing and parsing the input values—both numbers and operators—before passing them to the evaluation logic. There might be a flaw in the way I’m handling operator precedence or in how I’m converting the input into a valid expression.
If anyone has experience debugging calculator logic or managing dynamic input parsing, I’d appreciate any insights or suggestions!
Here’s my snippet of my blocks for equal function