Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

while

while loop.

Syntax

  • while test_expression, statements, end

Description

while loop executes a set of statements as long as a the test condition remains true.

Example

i = 0;
while lt(i, 10)
  disp(i)
  i = i + 1;
end

See also

for.

History

VersionDescription
1.0.0initial version

Author

Allan CORNET