[comp.text.tex] lists and ifx

msg@dciem.dciem.dnd.ca (Marc Grushcow) (06/11/90)

This question relates to emptying lists as created by the macros in the
TeXbook (pg 378).

I've got a bunch of items in a list, and now I want to dump them out into 
the text stream.  

This looks like a job for {\loop ... if ... \repeat}, but I only
want to do the repeat if the list is NOT empty. \ifx\list\empty tells me
if it IS empty, and I can't figure out how to get the not condition.
Something like {\loop ... \ifx\list\NOTempty ... \repeat}.

Help ??

Incidentally, if I create a token, i.e., \newtoks\xyz and then say
\leftappend{abcde}\to\xyz
why does \xyz then contain... \\{abcde\xyz   ??? 
What is \xyz doing there?

If in stead, I say   \def\xyz{}   and then do the \leftappend, I get the
expected   \\{abcde}

Thanks.

msg@zorac.dciem.dnd.ca
-- 
|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
|       Marc Grushcow, NTT SYSTEMS INC.                  | 
| msg@zorac.dciem.dnd.ca     ...!utzoo!dciem!msg         |
|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|