Title | Difference between a release marker and a version number | |
Author | William Gould, StataCorp |
At the top of an ado-file, we see the following:
*! version 10.0.0 28sep2007 program define myprog version 15.0
The first line is a “release marker”, which is nothing more than a glorified comment. The "*! version 10.0.0" (note the * in front) comment says that, in our tracking scheme, we at StataCorp think of myprog as version 10.0.0. To find out what version of Stata it was written for, you have to look further down into the guts of the program for the version statement.
Second—and this is the important part—even if a program says version 15.0 further down, that does not mean it cannot exploit the features from later versions. For instance, a version 6.0 program can be used with sortpreserve, a feature added in Stata release 7. You do not have to change the version statement at the top of an ado-file to exploit a modern feature.
sortpreserve can be used with version 6 programs or version 5, all the way back to version 1. What the version statement says is, “in the case of a change in the interpretation of a statement, use the interpretation of the version specified”. version 6 does not mean “and lose the features of more modern versions”.
Changing the version statement of a working program is a dangerous thing to do. Consider a program that says version 9. You know it works with that language interpretation. If you change the statement to read version 10, you must also go through every subsequent line and ask yourself, “has anything changed that would cause this not to work as it did?”
In our own programs, we sometimes do this, but only when we are about to make many changes to the program. We tend to think the modern way (and forget the limitations of older syntax). Here we start by translating the program to the modern version, verify it works, and then make our changes.
Usually, the changes required are minimal, but it is not uncommon that changing that statement by itself breaks the program.
On the other hand, if the changes we wish to make are minimal, we leave the version statement alone because that is safer and easier.
version is one of the best features of Stata in my opinion. It allows us to improve the language without being hamstrung by prior decisions and without breaking existing software. Do not think that because a program says version 9 or version 10, it is not modern. A modern idea can be expressed in a bygone language.
Learn
Free webinars
NetCourses
Classroom and web training
Organizational training
Video tutorials
Third-party courses
Web resources
Teaching with Stata
© Copyright 1996–2024 StataCorp LLC. All rights reserved.
×
We use cookies to ensure that we give you the best experience on our website—to enhance site navigation, to analyze usage, and to assist in our marketing efforts. By continuing to use our site, you consent to the storing of cookies on your device and agree to delivery of content, including web fonts and JavaScript, from third party web services.
Cookie Settings
Last updated: 16 November 2022
StataCorp LLC (StataCorp) strives to provide our users with exceptional products and services. To do so, we must collect personal information from you. This information is necessary to conduct business with our existing and potential customers. We collect and use this information only where we may legally do so. This policy explains what personal information we collect, how we use it, and what rights you have to that information.
These cookies are essential for our website to function and do not store any personally identifiable information. These cookies cannot be disabled.
This website uses cookies to provide you with a better user experience. A cookie is a small piece of data our website stores on a site visitor's hard drive and accesses each time you visit so we can improve your access to our site, better understand how you use our site, and serve you content that may be of interest to you. For instance, we store a cookie when you log in to our shopping cart so that we can maintain your shopping cart should you not complete checkout. These cookies do not directly store your personal information, but they do support the ability to uniquely identify your internet browser and device.
Please note: Clearing your browser cookies at any time will undo preferences saved here. The option selected here will apply only to the device you are currently using.