林只是要跳过代码 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是另一个子函数,但我不需要详细介绍。因为现在我的问题是这样的: 我运行'程序'功能并键入一个数字,但是它只是立即跳到结束消息,程序结束。该程序不应该先通过子功能吗?