
On 5/8/2025 7:02 PM, Pablo Rodriguez via ntg-context wrote:
Dear list,
I have the following sample code:
\starttext \startTEXpage[offset=1dk] \dostepwiserecurse{2}{6}{1}{\edef\AbC{\recurselevel}% \dostepwiserecurse{2}{7}{1}{%\AbC.\recurselevel\ /\ \ifnum\AbC < \recurselevel% \AbC:\recurselevel\ \|\| \fi} \\} \stopTEXpage \stoptext
I would like to only get the numbers in the form first:second loops if and only if the value of the first loop is less than the value from the second loop.
I think this should be simple, but I don’t get it with any of these conditionals:
\ifnum\AbC < \recurselevel
\ifnum\recurselevel > \AbC
Sorry for the stupid question, but what I am missing here?
Many thanks for your help,
These % after the comparison make tex scan on for the end of a number (a \relax of space ends the scan). You can do this: \starttext \startTEXpage[offset=1dk] \dostepwiserecurse{2}{6}{1}{% \dostepwiserecurse{2}{7}{1}{% \ifnum#1<##1\relax #1:##1\ \|\|% \fi }% \\% } \stopTEXpage \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------