Bookmark and Share

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: Stata Wishlist


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Stata Wishlist
Date   Thu, 17 Jan 2013 10:39:45 +0000

Sorry, but I think even this modest proposal is misguided.

Just about every non-trivial program is full of tests in the wake of a
-syntax- statement such as

if "`mymacro'" == "" {

}

and local macros were designed from the outset with the idea that
non-existence or emptiness is never an error as far as Stata is
concerned.

It is, in my view, not even a good idea as something that could be set
as an option _purely for those who want it_, because most of the
"errors"  it would trap would be deliberate coding in competently
written programs, and the developer resources implementing this would
be diverted from other things far more widely useful.

Nick

On Thu, Jan 17, 2013 at 10:00 AM, Allan Reese (Cefas)
<[email protected]> wrote:
> Il 10/01/2013 16:53, Clyde B Schechter ha scritto:

>> I wish the behavior of local macros were changed so that referencing a
> macro that has never been defined is an error, rather than treating it
> as an empty string.
>
> Various people pointed out where this would be undesirable, but it might
> be something reported as a warning at a high trace level.  See -set
> traceexpand-
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index