Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\bool_set:Nn not accepting a boolean to be set to its own value #1055

Closed
eg9 opened this issue Feb 21, 2022 · 0 comments
Closed

\bool_set:Nn not accepting a boolean to be set to its own value #1055

eg9 opened this issue Feb 21, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@eg9
Copy link
Contributor

eg9 commented Feb 21, 2022

Source: https://tex.stackexchange.com/q/634629/4427

\ExplSyntaxOn

\bool_new:N \l_test_bool
\bool_set_true:N \l_test_bool

\tl_show:x { \bool_if_p:n { \l_test_bool } }

\bool_set:Nn \l_test_bool { \l_test_bool }

\ExplSyntaxOff

would fail with “Missing number, treated as zero” because \tex_chardef:D makes \l_test_bool equivalent to \relax until the assignment is actually performed and the evaluation of the given boolean expression only leaves \l_test_bool, as demonstrated by the \tl_show:x line.

A workaround is to use a nontrivial boolean expression such as \l_test_bool && \c_true_bool, but it should be either documented or fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants