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

Re: st: Invalid file specification

From   "Austin Nichols" <>
Subject   Re: st: Invalid file specification
Date   Sun, 8 Jul 2007 12:38:20 -0400

Hendri Adriaens <>:
Kvetching about Stata's inability to detect and analyze your mistakes
is an unproductive, or even counterproductive, use of Statalist (you
got an answer to your initial question within 5 hours; casting
yourself as a complainer may reduce Statalist's response time). You
don't seem to take my point about there being an arbitrary line
between intelligent error trapping and bloated internal code that
Stata draws in one place, and various others might draw lower or

That said, I agree that there is an inconsistency in handling code
following an open brace--try out this code:

if 1==1 { di "ok" }
di "not ok"
if 1==0  di "not"
else { di  "else" }
foreach v of varlist _all { d `v'

to see what I mean. Part of the issue no doubt is that -if- has an
immediate form, e.g.

if 1==1  di "ok"

but since -else- can report the same error as -foreach-, I think -if-
could probably be made to do the same.

On 7/8/07, Hendri Adriaens <> wrote:
It is obvious that if -{- has as syntax rule to ignore following material,
it should check for following material and produce a warning, or better, an
error if material is found. Why do you have syntax rules if you don't check
them and just run along until the whole thing breaks down completely to
produce a totally irrelevant error message by that time?

*   For searches and help try:

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