break
break
terminates the execution of for
and while
loops. In nested loops, break
exits from the innermost loop only.
n
.
while 1
n = input('Enter n. n <= 0 quits. n = ')
if n <= 0,break,end
r = rank(magic(n))
end
disp('That''s all.')
end
,error
,for
,if
,return
,while
(c) Copyright 1994 by The MathWorks, Inc.