Announcement

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

  • Invalid syntax on Windows but not Mac

    Dear all, I have a few lines of code which looks like the following,
    Code:
    foreach gdp pop fdistk terr_cas trans_cas dom_cas {
        gen ln`x' = ln(`x')
    }
    I swap between a Macbook and a PC to work on this specific DO file. On my Mac, this runs as intended, but on PC it returns 'invalid syntax r(198)'.
    Is there any way to fix this so that it would work on both operating systems?

    Thanks!

  • #2
    Just for clarity: I accidentally forgot the 'foreach x in gdp pop...' while writing it on statalist -- that is not the reason it doesn't work.

    Comment


    • #3
      It's illegal on either OS, so it's hard (no, impossible) to believe that it ever worked. Something starting

      Code:
       
       foreach x in gdp pop fdistk terr_cas trans_cas dom_cas 
      should work. Simply, I think you just made a small error in copying that turns out to be fatal.

      Comment


      • #4
        Wait no an update to this - it appears I have made this mistake twice before -- I thought it was something that stata was doing wrong but apparently I just made a foolish oversight.

        Comment


        • #5
          nvm.

          Comment

          Working...
          X