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

Re: st: RE: Version control questions


From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: st: RE: Version control questions
Date   Fri, 29 Apr 2005 11:08:53 -0500

At 04:40 PM 4/29/2005 +0100, Nick Cox wrote:
In general, my advice is not to issue a program for
a version you don't have yourself, as you then
depend on others testing it.

In this case, you might try something like this

program myprog
        version 8.2
        local oktype = cond(`c(version)' < 9, "integer", "real")
        syntax ... , ... Level(`oktype' `c(level)')
Neat. This raises some interesting possibilities. For example, suppose you had a subprogram written in 8.2 and some equivalent and much faster code written for 9.0 Mata. You could call whichever was appropriate for the version being used.

My immediate concern, though, is just not unnecessarily limiting the function of a program written in 8.2 when a 9.0 user is using it, e.g. let the 9.0 user specify level 99.9 if that is what the user wants. It looks like the above will do that, but I'll test it on 9.0 before including it in my own code. Thanks.


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




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