Here the \expandafter instructions do one level expansion, while the \unexpand's prevent any further expansion. Without e-TeX, you could use token registers:
Here the \expandafter instructions do one level expansion, while the \unexpand's prevent any further expansion. Without e-TeX, you could use token registers:
but this is obviously more awkward (especially as the number of items grows).
Your suggestions don't work here because \hello is itself a macro with a parameter. Here we either need two \expandafter chains or exhaustive expansion:
Thanks! I think I get the idea now. I was somehow misleaded by expandafter definition that says that
\expandafter\a\b
"expands \b, then \a". A more correct statement I think would be that it expands \b than put \a back in front of it, not preventing it from being expanded. What I mean is that expandafter does not itself expands \a, right?
yes I agree that not using the braces does not work either. What I meant is that the code with the braces only works if the \hello command only takes a single argument...