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

Re: Re: st: RE: Version control questions


From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: Re: st: RE: Version control questions
Date   Wed, 01 Jun 2005 16:21:46 -0500

At 01:12 PM 4/29/2005 -0500, [email protected] wrote:
Richard Williams <[email protected]> asks:

> Thanks Ken.  So, to modify Nick's example, if my program is written in 8.2
> but I want to let the 9.0 users use the new level options, could I say...

Almost.  There is one error in the original suggestion (I did not
see it previously).  Instead of checking against `c(version)'
check against `c(stata_version)'.

So it should look something like

    program myprog
            version 8.2
            local oktype = cond(`c(stata_version)' < 9, ///
                                "integer `c(level)'", "cilevel")

            syntax ... , ... Level(`oktype')

            ...
I finally got Stata 9 and can confirm that the above code works as desired under both 8.2 and 9.0, e.g. 9.0 users could specify -level(99.9)- if they were so inclined while 8.2 users would still be limited to using integers.

I wonder if there are other potential applications along these lines - for example, could you have a "slow" subroutine written in 8.2, and a much faster one written in 9.0 using Mata?


-------------------------------------------
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