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: long local macro with line break


From   Sergiy Radyakin <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: long local macro with line break
Date   Wed, 6 Nov 2013 20:19:37 -0500

Lin, here are two examples:

local part1 `""Composite Index" "Life Expectancy" "Injury Death"
"Cancer Death" "Spent 30%+ Income on Rent"'
local part2 `""Preventable Hospitalization" "Poor or Fair Health"
"Obese" "Current Smoker""'
local ctlist2 `"`part1' `part2'"'
display `"`ctlist2'"'

macro drop _all

local ctlist2 `""Composite Index""'
local ctlist2 `"`ctlist2' "Life Expectancy""'
local ctlist2 `"`ctlist2' "Injury Death""'
local ctlist2 `"`ctlist2' "Cancer Death""'
local ctlist2 `"`ctlist2' "Spent 30%+ Income on Rent""'
local ctlist2 `"`ctlist2' "Preventable Hospitalization""'
local ctlist2 `"`ctlist2' "Poor or Fair Health""'
local ctlist2 `"`ctlist2' "Obese""'
local ctlist2 `"`ctlist2' "Current Smoker""'
display `"`ctlist2'"'

Best, Sergiy Radyakin

On Wed, Nov 6, 2013 at 8:10 PM, Song, Lin <[email protected]> wrote:
> Hi Statalist,
>
> In my do file, I'm putting a line break (///) for my local macro but I got a syntax error at the line break.
>
> local ctlist2 ""Composite Index" "Life Expectancy" "Injury Death" "Cancer Death" "Spent 30%+ Income on Rent"  ///
>  "Preventable Hospitalization" "Poor or Fair Health" "Obese" "Current Smoker""
>
> Is there a way to avoid this error?
>
> Thanks.
>
> Lin
>
>
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index