It looks as if you could compress the whole program into a couples less lines... as in, make all the buttons into an array; somehow make one procedure that tests if any button has been pressed...
BTW: A get this error and I'm wondering how to fix it (relates to making the buttons into an array.
If I did...
var buttons : array 1 .. * of int := init (GUI.CreateButton (5, 5, 71, "0", btn0))
The error appears:
Compile time expression expected
Why does that happen and how do i fix it???