hi ppl im neuen bei Scilab, Ich mache ein Skript, das ich den Benutzer durch Menüs senden, und ich mache eine Funktion für jedes Untermenü. Ich lese, dass Funktionen 0 Eingangsparameter haben können, aber es muss mindestens 1 Ausgangsparameter haben. dieser Laut i schrieb diesesScilab Error 4 Undefinierte Variable <Funktionsname>
//execution file landing menu
option='1'
while (option~=0)
clc
mprintf('1 - First Sub-menu')
mprintf('2 - Second Sub-menu')
option=input('Select the option: ', 's')
select option
case '1' then
result=sub_one(),
case '2' then
result=sub_two(),
else
disp('Invalid Option!!!')
end
end
//Function sub_one
function result=sub_one()
option='1'
while (option~=0)
clc
mprintf('1 - Do stuff')
mprintf('2 - Do other stuff')
option=input('Select the option: ', 's')
select option
case '1' then
result=do_stuff(),
case '2' then
result=do_other_stuff(),
else
disp('Invalid Option!!!')
end
end
result=0
endfunction
und ich bekomme immer die Fehler
result=sub_one(),
!--error 4
Undefined variable: sub_one
at line xx of exec file called by :
exec('dir\dir\dir\file.sce', -1)
das ärgerlich mich ist freaking
einige experter mich dann?