Saying
\count89=14 \the\count89~{\count89=11 \the\count89~}\the\count89
produces 14 11 14
, as one would expect. But, get rid of the space in the middle clause:
\count89=14 \the\count89~{\count89=11\the\count89~}\the\count89
and you get 14 14
. That makes sense too since the parser must eat up all of 11\the\count89
without a space to terminate the input.
So far, so good, but what does the middle clause actually do? Try
\count89=14 \the\count89~{\count89=11\the\count89 \the\count89~}\the\count89
and you get 14 14
. Note the additional space in the middle clause. Yet there is no output. The parser must be eating up everything to the closing brace and assigning it to \count89
. I know that \the\count89
evaluates to a series of tokens that are assigned the other
category code. I thought that this might somehow put the parser into an "eat everything" state until the closing brace, but that's not quite true. If you say
\count89=14 \the\count89~{\count89=11\the\count89~\the\count89~}\the\count89
(note the additional ~
), then the output is 14 1114 14
, which is what one might expect.
What's going on here? Why does ~
serve to terminate the input value, but a plain space does not?