... let me count the ways.
I can test it with\ifand\ifx
and\showits\meaning
And there I stop, both in my knowledge and my poetic ability (though some might argue that the latter never started).
Background: I'm still trying to get my head around the statement of what \noexpand does:
\noexpandtemporarily sets the next token to\relax.
The purpose of setting it to \relax seems to be that since \relax is not expandable, the next token does not get expanded the next time that TeX tries to expand it. But it does get expanded the time after that, so that seems to be the meaning of "temporarily".
But is the fact that it is temporarily set to \relax detectable? To test this, I want to examine what TeX thinks \noexpand\foo is, but that "temporarily" keeps getting in the way: it's all a bit quantum since the act of observing a \noexpand\foo seems to change it in some way.
Anyway, so I want to build a test suite to see if the value of \noexpand\foo is detectable in a significant way and for that, I need to know all the ways that I can get at its value, such as conditionals and \show. And that's my question.
Question: What ways are there of examining a macro or active token in TeX which reveal something about what it points/expands to?
\tracingalljust shows you '{\noexpand}'. – Joseph Wright♦ Mar 16 '11 at 10:59\meaningshows you the meaning of a token, but it will never show you the result of\noexpandbecause the later is a primitive acting on a token, rather than an assignment. – Joseph Wright♦ Mar 16 '11 at 11:17\notexpanded: \fooas an argument, it becomes\foo. Also, you can only test it once, so I guess that your best bet is\expandafter\ifx\noexpand\foo\yourtokenwhichisnotatoken. – Bruno Le Floch Mar 16 '11 at 11:21\ifand so on which can detect the value of a token. – Andrew Stacey Mar 16 '11 at 12:04