Difference between revisions of "Command/exitloop"
< Command
Jump to navigation
Jump to search
m (Create entire page) |
(No difference)
|
Revision as of 09:57, 14 June 2012
\exitloop
Syntax
\exitloop |
Description
Exit the loop at the end of current iteration.
Example
\doloop{ \ifnum \recurselevel=2 \exitloop \fi % but "Level 2!" is still printed Level \recurselevel! } \doloop{ \ifnum \recurselevel=2 \exitloopnow \fi % "Level 2!" is not printed Level \recurselevel! }
See also
- System Macros/Loops and Recursion
- Looping a fixed number of times
- \dorecurse for iterating from 1 to n.
- \dostepwiserecurse for iteration with arbitrary start, end, and step.
- \recurselevel for the iteration number.
- \recursedepth for the iteration depth, in the case of nested \dorecurse and co.
- 'While' loops with exit conditions
- \doloop for a loop that repeats until exited.
- \exitloop to exit a loop.
- \exitloopnow to immediately exit a loop.
- \recurselevel to know which iteration the loop is in.
- \recursedepth to know how many nested loops deep we are.
- \input is also often used to produce dummy text.
- LuaTeX for heavier-duty looping and iterating.
Help from ConTeXt-Mailinglist/Forum
All issues with: