<< try Scilab keywords TMPDIR >>

Scilab help >> Scilab > Scilab keywords > while

while

while keyword

Description

while clause. Must be terminated by "end"

while expr ,instructions,...[,else instructions], end

while expr do instructions,...[,else instructions], end

while expr then instructions,...[,else instructions], end

Notes:

Warning: the number of characters used to define the body of any conditionnal instruction (if while for or select/case) must be limited to 16k.

Examples

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

See Also

<< try Scilab keywords TMPDIR >>