Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

btw. I realized that "unsensical" is in itself a nonsensical word. My
appologies for my poor english.


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.


On Mon, Feb 11, 2013 at 3:01 PM, Jeph Herrin <> 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:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index