Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Why do `test' and a`test' make a difference?
From
daniel klein <[email protected]>
To
[email protected]
Subject
Re: st: Why do `test' and a`test' make a difference?
Date
Mon, 11 Feb 2013 16:58:01 +0100
I guess
[M-5] tokenget() -- Advanced parsing
is the best place to start, if you want to get deeper into this. This
is, to my knowledge, the place where parsing is documented in greatest
detail.
btw. I realized that "unsensical" is in itself a nonsensical word. My
appologies for my poor english.
Best
Daniel
--
I am not aware of a single source that documents in one place how
Stata parses command lines. My wild idea is that it would be too
complicated or too technical to be of much use, even to programmers.
My own main rule is too elementary and too homespun to be much use,
namely that it's best to assume that Stata is right by its own rules
and that misunderstandings have to be treated by trying to see what
you typed from her point of view, token by token, left to right, top
down, and very slowly.
Nick
On Mon, Feb 11, 2013 at 3:01 PM, Jeph Herrin <[email protected]> wrote:
> Thanks Daniel and Nick,
>
> I can usually work out why I get what I get, or at least get what I want,
> but do find that my most common programming errors occur because macros do
> not behave as I anticipate. Clearly, it is a limitation of my intuition, not
> of Stata, because I don't doubt that Stata is consistent; and I also don't
> doubt that if I used Stata for parsing strings as much as I once used Perl
> or awk or sed (ie, many hours a day) I wouldn't be surprised so often.
> Still, that I still get bit by these - and Stata is practically the only
> thing I program these last few years - suggests that the quirkiness Nick
> refers is perhaps a bit overglossed.
>
> cheers,
> Jeph
*
* 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/