Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: listtex header


From   Kit Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: listtex header
Date   Sun, 18 Feb 2007 13:05:51 -0500

Roger said

As I have
not explicitly included a 502-character limit in -listtex-, and as the
limit to the length of a macro is 67,784 characters (not 502
characters), it seems that the limit that Friedrich and I have
encountered is probably either in Stata or in Windows XP. It does not
seem to be in TextPad, bexause it persists when I use the -type- option
of -listtex- instead of a -using- qualifier, causing the output to be
routed to the Stata log. It is not likely to connected with a limit on
the length of a Stata command line, as that limit is 67,800 in
Intercooled Stata 9 (according to the on-line help for -limits-). Might
it be a problem with the -file- command?

It does not seem to be operating-system specific; I can reproduce the same 502-character limit (before a LF is issued) in Unix (Mac OS X).

As the help for -file- suggests that lines of any length can be written (with the admonition that lines longer than 67,783 bytes may be difficult to handle) this issue must be arising somewhere else. It is not -file write- that is the problem:

sysuse auto
forvalues i = 1/52 {
local head "`head'12345678901234567890"
}

file open test using test.txt,write
file write test "`head'" _n
file close test

will write a file with one line of 1040 bytes. So it must be the macval() function that Roger employs that is imposing tne constraint.
I imagine that somewhere along the line someone forgot to bring macval () into line with macros > 512 bytes.


Kit

Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index