All this doesn't stop me wanting, like
I guess all others in this thread, to
be able to specify within Stata that I
want to read a line of text from a
file and/or to write a line of text to a
file absolutely as is with no interpretation
of macros. That is, the desire is for something
like
file lread handle [specs]
file lwrite handle [specs]
where -lread- and -lwrite- indicate something
like a _l_iteral read and write.
I don't know exactly how easy that is to
do, but it is easy to ask for.
Nick doesn't specify what -lread- is going to read the line to, if not to a
macro, or what -lwrite- is going to write the line from, if not from a
macro. Presumably, this would be specified in the [specs]. However, IMHO a
macro is probably the best place to store a line, just as long as there is
a way of accessing the value of a macro without quoting anything. I still
think the way to go is probably something like the macro substring
functions -lsubstr(localmacroname,startaddress,length)- and
-gsubstr(glocalmacroname,startaddress,length)- that I proposed in a
previous thread, together with corresponding extended macro functions of
the same names, and probably an extended macro function for the length of a
macro value. However, like Nick, I only know how easy these things are to
ask for, not how easy they are for StataCorp to implement in Stata.