Looking for help to refactor a complex Online Calculator (800 blocks) - Logic & UI improvements

I notice that none of your procedures accept arguments or return values.

That forces dependence on global variables, which can add complications trying to keep them up to date.

See Chapter 21 of

from

You can use a common procedure for the digits (0-9) buttons, sending it the digit.

For your number length limitation, I would try building a value procedure that returns the consecutive digits length at the end of a given text. Use that to enable or disable further digit reception. (I don't see why such a limit would be needed in AI2.)

1 Like