Announcement

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

  • using * in a for-loop

    Hello,

    I can't figure out what does * mean in front of a for-loop. Here you can see an example:

    foreach var of varlist * {
    label variable `var' "`=`var'[2]'"
    rename `var' `=`var'[1]'
    }
    drop in 1/2
    destring *, replace
    d
    list

    In this example, what does the * put before the curly brackets do for the for loop?
    Sorry if it is too easy to answer, I looked through documentation and web but I can't find the answer and it frustrates me, so I'd be very happy for any even one-liner answer

    Cheers

  • #2
    Code:
    varlist * 
    means all variables. See

    Code:
    help varlist

    Comment


    • #3
      aaah! Of course! Daah... thank you!

      Comment

      Working...
      X