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, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Bug in comment - and comment on comment


From   "Allan Reese (Cefas)" <allan.reese@cefas.co.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Bug in comment - and comment on comment
Date   Thu, 23 Sep 2010 11:02:19 +0100

Martin Weiss" <martin.weiss1@gmx.de> and Ulrich Kohler <kohler@wzb.eu>
don't see the bug:

> I do not get your complaint! You opened two of those comments, and
closed
> only one. The output you get matches your input...

This *is* clearly a bug:
- a bug is when the software gives the wrong answer and contradicts the
documentation (or implied documentation)
- a feature is when the software gives an unexpected answer but the
documentation says it will
- a documentation error is when the computer gives the correct or
logical answer when the documentation implies it will not.

Stata documentation is explicit as quoted: "What appears inside /* */ is
ignored." (help comment).

Computing logic on all languages I know is consistent: code is parsed
either as to be executed or as comment.  I can see no logic justifying
nested levels of comment, even if the comment text might include nested
parentheses.  Having a work-round does not justify leaving a bug in a
program as a pratfall.

On reading the documentation, I can't find a warning that end-of-file of
a DO file does not act as end-of-line.  Hence it's a *feature* if you
use the DO-file editor and do not put the end-of-line on the last line
that it will not execute.
Type 
di "1"
di "2"
di "3"<cursor here>

and save as demo.do.  Then -do demo- gives
. do demo

. di "1"
1

. di "2"
2

. 
end of do-file

Remember to put some blank lines at the end of all DO files!
 

Regards
Allan


R Allan Reese
Senior statistician, Cefas
The Nothe, Weymouth DT4 8UB 

Tel: +44 (0)1305 206614 -direct
Fax: +44 (0)1305 206601 

www.cefas.co.uk 



***********************************************************************************
This email and any attachments are intended for the named recipient only.  Its unauthorised use, distribution, disclosure, storage or copying is not permitted.  If you have received it in error, please destroy all copies and notify the sender.  In messages of a non-business nature, the views and opinions expressed are the author's own and do not necessarily reflect those of the organisation from which it is sent.  All emails may be subject to monitoring.
***********************************************************************************


*
*   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/


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