On Mon, Nov 5, 2012 at 12:09 PM, Amadou DIALLO wrote:
> I thought of char:
> char _dta[one] `macro1'
> but in the created pr file, I can't find a way to put back the
> contents of the char into a local macro. The command:
> loc macro1 `_dta[one]
> is not working.
*------------- begin example ---------------
sysuse auto
// add the characteristics
char _dta[foo] "hello world"
// save the file
tempfile temp
save `temp'
// load the file
use `temp'
// put the characteristic in local macro bar
local bar : char _dta[foo]
// display the content of local macro bar
di "`bar'"
*-------------- end example ----------------
(For more on examples I sent to the Statalist see:
http://www.maartenbuis.nl/example_faq )
Hope this helps,
Maarten
---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany
http://www.maartenbuis.nl
---------------------------------
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/