Code: Select all
\documentclass{minimal}
\usepackage{expl3}
\ExplSyntaxOn
\begin{document}
\tl_if_novalue:nTF{\c_novalue_tl}{PASS}{FAIL} % prints FAIL
\ExplSyntaxOff
\end{document}
Code: Select all
\documentclass{minimal}
\usepackage{expl3}
\ExplSyntaxOn
\begin{document}
\tl_if_novalue:nTF{\c_novalue_tl}{PASS}{FAIL} % prints FAIL
\ExplSyntaxOff
\end{document}
\tl_if_novalue:nTF
tests if the token list is exactly equal to \c_novalue_tl
, meaning equal to the special token list which is stored inside \c_novalue_tl
. This is not the same as {c_novalue_tl}
, the token list consisting of exactly one token, \c_novalue_tl
itself.\c_novalue_tl
, you get the expected behaviour:Code: Select all
\documentclass{minimal}
\usepackage{expl3}
\ExplSyntaxOn
\begin{document}
\cs_generate_variant:Nn \tl_if_novalue:nTF { VTF }
\tl_if_novalue:VTF \c_novalue_tl {PASS}{FAIL} % prints PASS
\ExplSyntaxOff
\end{document}
\tl_if_novalue:nTF{#1}{PASS}{FAIL}
because the argument is not wrapped in a macro/variable.