林只是要跳過代碼 1)爲什麼程序繼續?
function program()
choice=input('What is your choice?','s')
runProgram(choice)
disp('the program will now end')
在該函數的不相關部分我只是應該1和5
function runProgram(choice)
if choice==1
loadfile
elseif.....
end
該函數只是確定哪些之間鍵入一個數字我們將運行的5個子功能。
function loadfile()
filename=input('Write the name of the file here: ','s')
loadfile(filename)
其中loadfile是另一個子函數,但我不需要詳細介紹。因爲現在我的問題是這樣的: 我運行'程序'功能並鍵入一個數字,但是它只是立即跳到結束消息,程序結束。該程序不應該先通過子功能嗎?