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]

From |
Steven Samuels <sjsamuels@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: RE: Critique on comment syntax and suggestions |

Date |
Fri, 28 Jan 2011 16:59:32 -0500 |

A semicolon will end a comment beginning with "*": * The next command WILL get processed ; sum mpg;

Steve I'm not persuaded, Nick. Change my comment line to: // The next command won't get processed ; sum mpg;

Steve On Jan 28, 2011, at 4:10 PM, Nick Winter wrote: Two points:

Nick winter On 1/28/2011 3:04 PM, Steven Samuels wrote:

As I look at Stata's output, I do think I see a small bug in theresultsdisplay. ***************************** sysuse auto, clear # delimit ;// This next line won't get processed because I forgot to put asemicolondrop if mpg ==.; ****************************** Output (SMCL or text) **************************** sysuse auto, clear . # delimit ; delimiter now ;. // This next line won't get processed because I forgot to put asemicolon> drop if mpg ==.; (0 observations deleted) ***************************** Notice that the line beginning the valid command is started by a continuation character ">". I would call this a bug, but it does not mean that the line is part of the comment! Steve I think there is a small inconsistency, as Joseph pointed out. A You are not correct, Daniel; the following line is _not_ a part of the comment. Take a look at Joseph's message, especially his example 3 at http://www.stata.com/statalist/archive/2008-09/msg01271.html Steve On Jan 28, 2011, at 2:34 PM, Daniel Feenberg wrote: On Fri, 28 Jan 2011, Steven Samuels wrote:-- -- I've been bitten in the past by omitting semicolons. I now use continuation characters, and reserve the semicolon to delimit single commands, especially for graphs, that have many, often long, options. I find such commands easier to read and modify if each option is on a single line. If I use continuation characters in such commands, the lines look messy unless I line the characters up. For me that's too much work. As Nick said, it's personal taste.Bryce, you are asking Stata's do-file editor to find syntax errors,and INot really - the line: drop if criticalvar=1; is stricktly speaking part of the comment, and he is asking that it becolored as a comment, to match the view that Stata will take.Currentlythe editor is treating it as executable, which is clearly an incorrect parsing of the code.don't think that's its function. After reading the second post David referred to (it's by Joseph Coveney), I don't really see a bug. Off topic, "Stata" is spelled "Stata." See the FAQ Section 8.2. Steve* * 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/ * * 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/

-- -------------------------------------------------------------- Nicholas Winter 434.924.6994 t Assistant Professor 434.924.3359 f Department of Politics nwinter@virginia.edu e University of Virginia faculty.virginia.edu/nwinter w S385 Gibson Hall, South Lawn * * 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/ * * 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/

**References**:**st: Critique on comment syntax and suggestions***From:*"Mason, Bryce" <Bryce.Mason@lmu.edu>

**st: RE: Critique on comment syntax and suggestions***From:*"David Radwin" <dradwin@mprinc.com>

**Re: st: RE: Critique on comment syntax and suggestions***From:*Nick Cox <njcoxstata@gmail.com>

**Re: st: RE: Critique on comment syntax and suggestions***From:*Steven Samuels <sjsamuels@gmail.com>

**Re: st: RE: Critique on comment syntax and suggestions***From:*Daniel Feenberg <feenberg@nber.org>

**Re: st: RE: Critique on comment syntax and suggestions***From:*Steven Samuels <sjsamuels@gmail.com>

**Re: st: RE: Critique on comment syntax and suggestions***From:*Nick Winter <nwinter@virginia.edu>

- Prev by Date:
**st: Lagged price** - Next by Date:
**st: Re: Lagged price** - Previous by thread:
**Re: st: RE: Critique on comment syntax and suggestions** - Next by thread:
**Re: st: RE: Critique on comment syntax and suggestions** - Index(es):