Announcement

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

  • macro issues

    I would like to combine global and local macros to write something like
    forvalues i = 1/`i1' {
    global b`i' $f`i'
    }
    trying to cycle through $f1, $f1, etc. The problem is that the global macro $f binds first rather that the local binding first to make $f1.
    Is there an alternative construction, or a work around?

  • #2
    I think what you want is:
    Code:
    forvalues i = 1/`i1' {
    global b`i' ${f`i'}
    }

    Comment


    • #3
      That solved it wonderfully. I had tried parentheses, but they did not work.

      Comment

      Working...
      X