Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • I have already included the parantheses in my foreach syntax, but it still shows sth wrong

    Dear,

    I met a problem today, and tried many times and it didn't work. I wrote down a foreach systax, but it always shows that { required. In fact, I have already included { } in my program. Please read the following:

    local w1 “domsaving netsaving srate edu infla ss ss2”

    local w2 “insur8 fd1 sex_unsafe rategap old young"

    foreach v of varlist `w1' `w2' {
    replace `v'= `v'/100
    }

    { required
    r(100);


    end of do-file

    Best,

    Eddie

  • #2






    I see different double quotation marks when I copy your code. Both should be " ".

    Code:
    local w1 “domsaving netsaving srate edu infla ss ss2”
    
    local w2 “insur8 fd1 sex_unsafe rategap old young"
    
    foreach v of varlist `w1' `w2' {
    replace `v'= `v'/100
    }

    Comment

    Working...
    X