# Equal logic

**URL:** <https://community.thunkable.com/t/equal-logic/4107668>\
**Category:** Questions about Thunkable X\
**Created:** [September 26, 2025, 4:48am UTC](https://community.thunkable.com/t/equal-logic/4107668 "2025-09-26T04:48:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthroi](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@anthroi](https://community.thunkable.com/u/anthroi)\
**Post date:** [September 26, 2025, 4:48am UTC](https://community.thunkable.com/t/equal-logic/4107668/1 "2025-09-26T04:48:54Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/d/9d7609b02bcc412dd76e3afe9454bd9796a2555a.png)

---

<div class="post-metadata">

**Author:** ![anthroi](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@anthroi](https://community.thunkable.com/u/anthroi)\
**Post date:** [September 26, 2025, 4:49am UTC](https://community.thunkable.com/t/equal-logic/4107668/2 "2025-09-26T04:49:53Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/7/d768e66afca0ef8f3359d294ea3297ae5fd7e412.png)  
here’s my logic for numbers and operators

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [September 26, 2025, 2:17pm UTC](https://community.thunkable.com/t/equal-logic/4107668/3 "2025-09-26T14:17:58Z")

</div>

Hello @anthroi, welcome to Thunkable! 🎉

The equal conditions are used because it is not possible to set the arithmetic calculation dynamically. So all the different blocks must be added, and a variable defines which must be executed.

Be sure to check out [How to ask Great Questions v2.0](https://community.thunkable.com/t/how-to-ask-great-questions-v2-0/2689983/1), the [Community Guidelines](https://community.thunkable.com/t/community-guidelines/78/8), and our [Getting Started Guide](https://docs.thunkable.com/getting-started/get-started) to make the best of your Thunkable Community experience!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [December 25, 2025, 2:18pm UTC](https://community.thunkable.com/t/equal-logic/4107668/4 "2025-12-25T14:18:54Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
