Bookmark and Share

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]

Re: st: Syntax highlighting


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Syntax highlighting
Date   Wed, 4 Apr 2012 20:44:16 +0100

I see no problem with this code. Note that in Stata 12 (which you are
assumed to be using unless you state otherwise) -rename- can be used
for such changes and no loop is needed.

Nick

On Wed, Apr 4, 2012 at 8:33 PM, Darves, Derek <[email protected]> wrote:
>>
>>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.
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index