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

st: -tempvar- not dropped after -save-


From   "Daniel Muller" <[email protected]>
To   "Statalist" <[email protected]>
Subject   st: -tempvar- not dropped after -save-
Date   Mon, 12 May 2003 19:18:46 +0200

I have a (part of a) small program, where I create -tempvar-s. However,
the -save- keeps these temporary variables in the saved file. What am I
missing here?

---------------
prog def spatsam
	version 8.0
	syntax , Gap(int) Xc(str) Yc(str) SAVing(str) REPLACE
	preserve
	tempvar x y
	gen `x'=`xc'/`gap'
	gen `y'=`yc'/`gap'
	keep if `x'==int(`x') & `y'==int(`y')
	save `saving', `replace'
	restore
end
---------------

Thanks in advance, greetings,
Daniel


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