Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Version control question

From   Richard Williams <>
Subject   Re: st: Version control question
Date   Mon, 03 Oct 2005 14:28:48 -0500

At 01:36 PM 10/3/2005, wrote:
Having an older -version #- statement does not turn off the new
features introduced in later versions.  It only changes the
behavior of commands for those limited cases where version
controlling is really needed.  Take a look at
An example of this, which was mentioned a while back (I believe Nick Cox and others pointed me in the general direction), is the use of the -level- command. Here is a snippet from -gologit2- that shows how you can give 9.0 users the added flexibility of that command while still keeping the program running under 8.2:

version 8.2
local oktype = cond(`c(stata_version)' < 9, ///
"integer `c(level)'", "cilevel")
syntax [varlist(default=none)] [if] [in] /// Standard Stata
[pweight fweight iweight] [, ///
ROBust CLuster(varname) ///
Constraints(string) ///
SCore(passthru) ///
Level(`oktype') /// display options

       Sometimes people think that if they are running Stata 9.1
       and they place a -version 8- at the top of a program or do
       file, get it running in their modern Stata, and then give
       it to someone who only has Stata 8 (has not purchased
       Stata 9) that the person using Stata 8 will be able to run
       the program or do file.  The Stata 8 user will only be
       able to run it if you avoid all the new commands and
       language features found in your more modern Stata.
Very good point. I've been zapped once or twice with -gologit2-, because I made modifications in 9.0 and didn't check to make sure that the program still worked right in Stata 8.2. I currently have Stata 7, 8, and 9 on my computer - there is no great need to uninstall earlier versions unless you need the hard disk space. If you are willing to go to the hassle, users of older versions of Stata will probably appreciate it if you don't limit your program unnecessarily.

Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: Richard.A.Williams.5@ND.Edu
WWW (personal):
WWW (department):
* For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index