Announcement

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

  • version xx.x not working for me

    I thought that if I added

    version 11.2

    at the top of an ado file or mata section, that Stata will refuse to run facilities that were introduced since version 11.2. However, using Stata 14, I am able to run mata code using the recently introduced unicode string functions eg ustrpos and ustrtrim. The code fails when run in Stata 13. This is not what I expected from the reading the documentation.

    Is this a bug or am I missing something?

    Is there a way to ensure that Stata warns about using features that may not be available in an older version?

    Cheers,


  • #2
    No, your expectation was incorrect. The use of -version xx.x- allows Stata to understand older syntax and commands that have been superseded in the current version. In some cases (which are documented in detail at -help version-) it also changes the default behavior of some commands back to what it was in the earlier version. But it does not, in general, restrict Stata from using newer commands and syntax. It just permits it to continue to understand the outdated code.

    I think the only way you can verify that code does not use features that were not available before an older version is to run the code on the actual older version of Stata. -version- will not get you that.

    Comment


    • #3
      More at http://www.stata.com/support/faqs/pr...ion/index.html

      Comment


      • #4
        Originally posted by Clyde Schechter View Post
        I think the only way you can verify that code does not use features that were not available before an older version is to run the code on the actual older version of Stata. -version- will not get you that.
        That is the reason why I still have older versions of Stata on my computer. I use it run certification scripts for my own programs, to make sure it operates as expected on older versions of Stata.
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment


        • #5
          I have every version of Stata from 7 on up on my machine. Unlike many software programs, Stata (so far at least) makes this easy to do. When you get a new version you don't have to uninstall the old one. And, even if you get a totally new computer, all you have to do is copy the folders from the old machine on to the new one, i.e. you don't have to reinstall every version from scratch. Besides making sure your programs run as expected on old versions this also gives you documentation on how old versions worked. So, for example, if a do file has a command like

          version 7

          I can fire up version 7 and check the help files for whatever commands or options I am not sure about.

          Because of version control, Stata actually has a huge amount of code that is undocumented, e.g. I can check the syntax for regress in 14.2, but if that syntax was different in version 7 the code may have options that are not currently documented. By firing up version 7 I can see what those options mean.

          So long as Stata continues to provide docs in pdf files and keeps old versions of the documentation online, this should become less and less of an issue across time.
          -------------------------------------------
          Richard Williams, Notre Dame Dept of Sociology
          StataNow Version: 19.5 MP (2 processor)

          EMAIL: [email protected]
          WWW: https://www3.nd.edu/~rwilliam

          Comment

          Working...
          X