# \ifthenelse command when using expl3 syntax

What is the equivalent of \ifthenelse{<statement>}{<iftrue>}{<iffalse>} when using expl3 syntax?

• expl3 has different conditional macros, such as \bool_if:NTF \some_bool {true branch}{false branch} or \seq_if_in:NnTF etc, depending on the 'variable' type and the precise application usage – user31729 Feb 16 '19 at 19:39
• Let's say I want to check whether two integers are equal or not, would something like \bool_if:{ \equal{#1}{#2} }{ <iftrue> }{ <iffalse> } work? – noibe Feb 16 '19 at 19:42
• No, since integers are not bool, at least not that way. \int_compare:nNnTF {#1} = {#2} {true}{false} -- the \equal etc. syntax is not available in expl3 and I found \ifthenelse never convincing -- see the interface3 manual please – user31729 Feb 16 '19 at 19:44
• You could do \bool_if:nTF { \int_compare_p:nNn {#1} = {#2} } { true } { false }, but as @ChristianHupfer says normally one would use just the basic int comparison. – Joseph Wright Feb 16 '19 at 19:46
• @ChristianHupfer No, quite the opposite, but it's using the general 'do some comparisons' syntax – Joseph Wright Feb 16 '19 at 19:48