The next Statement - Maple Programming Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Programming : Flow Control : Iteration or Looping : next

The next Statement






When the next statement is executed, the result is to exit from the current statement sequence (that is, the do-end do block) that corresponds to the innermost repetition (for/while/do) statement within which it occurs.


To exit from the current statement sequence means to allow execution to proceed with the next iteration of this repetition statement.


Note: To "proceed with the next iteration'' implies to increment the index of iteration, and then to apply the tests for termination (specified by the to-clause and the while-clause, if present) before proceeding.  Thus, an exit from the loop may occur.


It is an error if the next statement is executed in a context other than within a repetition statement.


In Maple V Release 5.1 and earlier, next was just a Maple symbol. In Maple 6 and later, next is a keyword in the Maple language.


fornto3doifn=2thennextend if;printnend do




See Also



Maple keywords


Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam