So far i have 20 buttons (widgets) on my calculator, when a button gets pressed it gets put into a table, which then gets displayed through table.concat(), for example i press 1 +34 - 32 , 1 gets put in table[1] , + gets put in table[2], 3 gets put in table[3]… and so on. Then i created a new table to sort through table, this sorting function gets called when the user presses =, for example i press 1+34-32, 1 gets put in the new table ; table2[1], + gets put in table2[2] , 34 gets put in table2[3], - gets put in table2[4] and soo on. So the numbers are in odd number table2{} positions and the operators all get put into even table2{} positions. I now want to calculate the answer after i press =, using the values i put into table2{}. Using BEDMAS… Decimals are also present in this program… If someone could help it would be greatly appreciated.
Thanks