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 at the end of May, and its replacement, statalist.org is already up and running.


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

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


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Bug in comment - and comment on comment
Date   Tue, 21 Sep 2010 13:03:33 +0200

<>


If your command is exceedingly long, you can also throw the -delimit- switch, as in -help delimit-.


HTH
Martin


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Ulrich Kohler
Sent: Dienstag, 21. September 2010 12:58
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: Bug in comment - and comment on comment

Allan Reese (Cefas) wrote:
> Just found this in V10, so try it in other versions.  It's so blatant!
> 
> I have a long complex scatterplot command in a DO file, using /* */ to
> ignore line ends.  
> With the auto data, put this in a DO file.
> 
> scatter weight mpg [fw=price]  /* 
>    */ , ms(oh)
> di "here"
> 
> To see the graph with standard size markers, insert another
> start-comment
> 
> scatter weight mpg /* [fw=price]  /* 
>    */ , ms(oh)
> di "here"
> 
> And no output!  But /* inside /* */ should be ignored.  "What appears
> inside /* */ is ignored." (help comment).


Martin Weiss already answered this. However, regarding


> /* */ has another advantage I'd not noticed before.  When a command
> extends over several lines and you want to comment it out of the DO
> file, just add * to the first line and all following lines also start *
> so are comments.
> * scatter ... /*
> */ ... /*
>   */ etc 


note that this can be also with ///

scatter ... ///
        ... ///
        etc 


(Actually, /* */ has been the standard way to split commands over
several lines for many years. It has been superseded by /// with the
appearance of Stata 8.)

Many regards
Uli



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


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