Statalist The Stata Listserver

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

Re: st: RE: RE: tabstat: how to save...

From   "Michael Blasnik" <>
To   <>
Subject   Re: st: RE: RE: tabstat: how to save...
Date   Wed, 10 May 2006 09:09:54 -0400

You have a remarkable ability to not follow the sound advice you receive and then complain about things not working. If you would just actually use the exact code that is posted, you would have far fewer problems.

-tempname- and -local- are two different commands that do different hings. -tempname- will create a local macro that can then be used to name objects like scalars. Please read -help tempname- .

Your line of code -local incidnsum- does nothing -- it assigns nothing to the local macro called incidnsum.

Please follow the advice you get from Statalist EXACTLY before you send in more follow-up posts about things not working.

Michael Blasnik

----- Original Message ----- From: "b. water" <>
To: <>
Sent: Wednesday, May 10, 2006 8:41 AM
Subject: RE: st: RE: RE: tabstat: how to save...

The reason I said what I said is when I did:

. do "C:\DOCUME~1\waterb\LOCALS~1\Temp\STD02000000.tmp"

. local incidnsum

. sum incidn, meanonly

. scalar `incidnsum' = r(sum)
= invalid name

end of do-file

. help scalar

revealled some example on how to use scalar, where none was put in Stata quotes ` '. This led me to surmise that it is probably version issue of scalar syntaxes. But on closer look I realised that perhaps you are referring to may lax ( due to ignorance) use of -local- rather -tempname- in my -do- file, and consequently having to use -scalar- without `'. Is this what you meant by your warning? Although I think your warning refers to [P] Macro, I would appreciate if you can direct me to the pertinent reference in the manuals if this is assumption was not correct. Nevertheless, I have used your exact example using -tempname- and -scalar `foosum'-.

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index