|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: local macro tempvar troubles
On Oct 2, 2007, at 11:55 PM, Timothy Dang wrote:
I'm using Stata/IC 10.0 on a Mac, just in case that matters.
[snip]
I'm flummoxed. Anyone know what I'm foolishly overlooking?
On Oct 3, 2007, at 7:55 AM, Nick Cox replied:
In your example you had a typo that you found. It's my bet,
although it's not obvious from
your example, that in your real code there is at least one other typo.
[snip]
In well-developed text editors, you will have a command that lets
you search for the identifier under the cursor, or that in
equivalent terminology. So, this kind of error is easier to spot in
a good editor.
On Oct 3, 2007, at 8:20 AM, Timothy Dang rejoined:
I have had similar problems in the past in other software when
invisible characters or invisible differences between characters
caused things which looked identical to me to be different for the
software. That doesn't seem like a good explanation here because
(1) it seems an unlikely feature of the Stata do-editor, and (2)
search & replace also thought things were identical.
I agree with Nick: either a typo or a stray "invisible" character
is the most likely culprit here.
Since you are using Mac OS X, there are a number of external text
editors that frankly should be preferred to using the do-file editor
built into Stata, as it is relatively under-powered and feature-
starved. A reasonable place to start would be the free editor
TextWrangler from <http://www.barebones.com/products/textwrangler/
index.shtml>, and add to that the \ Stata Language Module from
<http://dataninja.wordpress.com/2006/02/28/stata-language-module-for-
textwrangler/>, which will assist with identifying coding errors.
Additionally, you likely will find the integration of TextWrangler
with Stata improved by the following Stata Scripts: <http://
dataninja.wordpress.com/2006/08/18/stata-scripts/>.
Additional information about using external editors with Stata --
which I highly recommend and which is often suggested on Statalist --
can be found at <http://fmwww.bc.edu/repec/bocode/t/
textEditors.html>. Hope this helps.
-- Mike
*
* 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/