in reply to calculator script

You are using Infix notation. There are methods to translate between infix notation to prefix notation / polish notation or postfix notation / reverse polish notation, which may be easier to use to write a calculator (as long as you are familiar with stacks).

--MidLifeXis