According to the TeXbook's* description of the
construct on p. 209 (the emphasis is mine)
TeXwill expand macros following
\ifuntil two unexpandable tokens are found. If either token is a control sequence,
TeXconsiders it to have character code 256 and category code 16, unless the current equivalent of that control sequence has been
\letequal to a non-active character token. In this way, each token specifies a
(character code, category code)pair.
What if one, or both, of the unexpandable tokens is an active character, e.g.
\catcode`@=13% \if\noexpand @ ...
What is an active character's effective character code in the "eyes" of an
* 20th printing, Addison-Wesley 1991