<< select Control flow while >>

Scilabヘルプ >> 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

参照


Report an issue
<< select Control flow while >>