When typesetting an algorithm, is there an elegant way to break/continue out of a nested loop. Something like how it is done in Rust. Any recommendations?
\begin{algorithm}
\texttt{'J:} \For{i = 1,...,n}{
\For{j = 1,...,m}{
\If{Something}{
\KwSty{break} \texttt{'J}
}
}
}
\end{algorithm}
\foreachthere are commands like\breakforeach. – Nov 12 '20 at 21:41algorithmicxyou can use\algsaveand\algrestore. See Algorithm over 2 pages. – Werner Nov 23 '20 at 20:47