Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: a ui suggestion


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: a ui suggestion
Date   Fri, 14 May 2004 10:46:00 +0100

Good point. Please consider 

program mysave
	version 8 
	syntax [anything(name=filename)] [, * ] 
	qui { 
		if `"`filename'"' == "" { 
			local filename `"`c(filename)'"' 
			save `filename' `0' 
		} 	
		else save `0' 
	} 	
	display as text `"file {stata use `filename':`filename'} saved"'
end 

I am not sure I would ever want this myself. No matter. 

Nick 
[email protected] 

Bill Rising
 
> On 5/13/2004 16:54, Nick Cox wrote
> 
> >Do you mean 
> >
> >program mysave
> >	version 8 
> >	syntax anything(name=filename) [, * ] 
> >	qui save `0' 
> >	display as text `"file {stata use `filename':`filename'} saved"'
> >end 
> >
> >? 
> 
> Yes, a good suggestion by Nick. Using 
> 
> mysave, replace
> 
> would fail, though. Of course, this, too, could be worked around, by 
> making the filename optional and then checking for errors and 
> the like. 
> 
> I was actually suggesting it as a real built-in change, 
> because it seemed 
> like a good extension of smcl. If it became part of the 
> internals for any 
> kind of saving, it could also then be implemented for *every* save 
> operation, such as 
> -graph ..., saving()-
> 
> This would make smcl files even more useful.

*
*   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