Command/exitloopnow

From ConTeXt wiki

\exitloopnow

Syntax

\exitloopnow

Description

Exit the loop immediately.

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

Help from ConTeXt-Mailinglist/Forum

All issues with: