<< select Control flow try >>

Scilab Help >> Scilab > Control flow > then

then

'if'および'select'のキーワード

説明

制御フローifおよびselectにおいて 使用されます. 各thenキーワードは, if, elseif または caseキーワードと同じ行に置く必要があります.

キーワードthen はキャレッジリターンまたはカンマで 置換できます.

if 2*2 == 4 then
   disp("It works")
end

n=round(10*rand(1,1))
select n
    case 0 then
        disp(0)
    case 1 then
        disp(1)
    else
      disp(n);
end

参照

履歴

VersionDescription
6.0.0 then is now protected: Assignments like then=1 are no longer possible.

Report an issue
<< select Control flow try >>