<< return Scilab keywords semicolon (;) >>

Scilab help >> Scilab > Scilab keywords > select

select

select キーワード

説明

select expr,
  case expr1 then instructions1,
  case expr2 then instructions2,
  ...
  case exprn then instructionsn,
  [else instructions],
end

注意:

警告: 条件文(if while for または select/case)の本体の定義に使用できる文字数は 16k に制限されています.

例

while %t do
  n=round(10*rand(1,1))
  select n
  case 0 then 
    disp(0)
  case 1 then
    disp(1)
  else
    break
  end
end

参照

<< return Scilab keywords semicolon (;) >>