Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!csrd.uiuc.edu!s41.csrd.uiuc.edu!eijkhout From: eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) Newsgroups: comp.text.tex Subject: Re: Problem using \write Message-ID: <1990Dec13.164542.21155@csrd.uiuc.edu> Date: 13 Dec 90 16:45:42 GMT References: <1990Dec13.090011.15883@ariel.unm.edu> Sender: news@csrd.uiuc.edu (news) Organization: UIUC Center for Supercomputing Research and Development Lines: 28 wester@ghostwheel.unm.edu (Michael Wester) writes: >\def\qqq{\length{argument}} % try out an example >\qqq % this causes an 8 to be written in the DVI file >\immediate\write16\qqq % however, this causes an error >[...] I presume the \write causes >the same sort of expansion as \edef. Correct. And to add to your problems: the length macro uses not only expansion, but also assignments, which are not expandable. You can view your results interactively but having the \write *inside* the macro you are testing. Of course this is not what you want. This may be a silly solution, but I think it works: \setbox0\hbox{\qqq} \tracingonline=1 \showbox0 This shows you what's in box0 (without the \tracingonline you get this only in your log file), in particular the characters that have been typeset in it. Victor.