所以我正在研究圖形計算器(比基本窗口更有挑戰性),我希望能夠完成整個「數學「在一個文本字段中,就像輸入」5 + 3-5 * 11/3「一樣,當您按下'='時它會給出解決方案。Actionscript/Animate - 填充下一個陣列點(如果已經填充)
我決定使用數字和符號數組,我不知道如何使它填補下一個數組,如果這一個已經被使用:
var numbers:Array = new Array("","","","","","","","","","","","","","","","");
var actions:Array = new Array("","","","","","","","","","","","","","","","");
我使用拆分拆分與符號數I輸入,我想數字被放置在陣列。例如:我輸入555 + 666然後我需要類似
if (numbers[0] = "") {numbers[0] = 555}
else if (numbers[1] = "") {numbers[1] = 555}
else if.....
知道我的意思了嗎? 很難形容...... 類似...當我輸入一個數字時,如果數字[0]已經填滿,請填寫數字[1],如果數字[1]被填充,則轉到數字[2] etc
這當然解決了嗎?在'var':int = 0'處使用'for'循環,如果'i