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]
st: bug in bs4rw (or bug in Stata?)
From
Keith Dear <[email protected]>
To
[email protected]
Subject
st: bug in bs4rw (or bug in Stata?)
Date
Wed, 23 Mar 2011 12:49:39 +1100
-bs4rw- bootstraps a command which may be user-defined. It seems the
command MUST have options, or at least a syntax statement ending in ",
*". This seems undesirable.
The following code snippet from bs4rw.ado shows that `cmdname' is
called with a comma even if `cmdopts' and `rest' are empty.
If `cmdname' in fact has no options, this causes bs4rw to crash with
the error message "options not allowed".
. capture noisily quietly `noisily' `version' ///
. `cmdname' `cmdargs' ///
. `wgt' if `touse', `cmdopts' `rest'
(This is in the code section "bs4rw: First call to `cmdname' with data
as is" : later on the issue is handled more carefully.)
But anyway, it seems to me that this should not be a problem, and the
bug is really in the Stata language, not in bs4rw after all. Consider
this:
. prog snip
. syntax
. end
. snip // no effect of course, but no problems either
. snip , // the comma triggers the "options not allowed" error even
though no options have been given.
Should this be an error? I don't think so.
Keith
--
Dr Keith Dear
National Centre for Epidemiology and Population Health
ANU College of Medicine, Biology and Environment
Australian National University
Canberra, ACT 0200 Australia
CRICOS provider #00120C
Phone +61 (02) 6273 2208
Mobile 0424 450 396
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/