Statalist


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

st: RE: Pasting standard text into a .do file via an .ado file?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Pasting standard text into a .do file via an .ado file?
Date   Wed, 4 Jul 2007 18:19:18 +0100

I am not clear what the real underlying problem is here, 
but I wouldn't try to do anything like this using -display-. 

If you want a standard header in a .log, for example, then 
you could put text in a file and then just -type- the file
so that its content was displayed. 

Otherwise, you could use -file- to read and/or write blocks 
of text. 

Or, just keep a template file and use that as the start 
for new .do files. 

Nick 
[email protected] 

Clinton Thompson

> I've searched the help files & online documentation, as well as
> conducted a cursory search of the Statalist archives, all to no avail,
> so I'm posting my query to all of you.  And with that, my query:  I
> want to write an .ado file that, when invoked, will open up a blank
> .do file [doedit] then paste a bunch of standard text (via a series of
> -display- commands) into the .do file.  This is sort of what I'm
> envisioning:
> 
> /* ***************... *************** */
> /* Program Name:  ************* */
> /* ...so forth and so on...         */
> /***************...**************** */
> 
> clear
> version 9.2
> set more off
> capture log close
> 
> ---- snip -----
> 
> I can generate the above via a series of -display- commands but where
> I get confused is HOW  can an .ado file (I'm sure it can be done,
> albeit I'm at a loss as to how...) paste this into a blank .do file
> instead of in the output window?!

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index