<< try Control flow Configuration >>

Scilab Help >> Scilab > Control flow > while

while

while キーワード

呼出し手順

while expr ,instructions,..., end
while expr do instructions,..., end
while expr then instructions,..., end

説明

while 構文. "end"で終わる必要があります.

注意:

Scilabプログラミング言語のコード規約に基づき, 以下が推奨されます:

例えば以下のようにします:

i = 0;
while i<5
    disp(i);
    i = i + 1;
end

以下は推奨されません.

i = 0; while i<5, disp(i), i = i + 1; end

e=1; a=1; k=1;
while norm(a-(a+e),1) > %eps,
    e=e/2;
    k=k+1;
end
e,k

参照

履歴

VersionDescription
6.0.0
  • The [,else instructions] syntax is no longer supported.
  • while is now protected: Assignments like while=1 are no longer possible.

Report an issue
<< try Control flow Configuration >>