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: Syntax highlighting


From   "Cohen, Elan" <cohened@upmc.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Syntax highlighting
Date   Wed, 4 Apr 2012 20:28:52 +0000

I use Notepad++ and have the same issue.  I believe what's happening is that ' is acting as an escape character for ".  Hence Notepad++ doesn't recognize that the quote is being closed.  As an (unsatisfactory) workaround, I usually just add *" to the following line.  This returns the syntax highlighting to normal.

HTH,

- Elan


--
Elan D Cohen, MS
Center for Research on Health Care Data Center
University of Pittsburgh 
cohened@upmc.edu
*Follow the ICRE on Twitter @PittICRE and like us on Facebook*




-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Darves, Derek
Sent: Wednesday, April 04, 2012 15:33
To: statalist@hsphsun2.harvard.edu
Subject: st: Syntax highlighting

>
>Hi All,

When using an external text edit program with the stata commands loaded I
find that any loop in the file does not seem to "close," such that syntax
is incorrectly highlighted from the loop forward. Is this something wrong
with the code here:

foreach var of varlist x1 x2 x3 {
capture rename `var' `=lower("`var'")'
}




It runs fine in Stata but seems to cause a problem with syntax
highlighting, where everything to follow is treated as a comment.

Thanks for any help with this,
Derek


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