This is a frequent misunderstanding about -version-
and arises often on this list. I think it is a very
understandable misunderstanding, as explaining with complete
clarity and complete correctness exactly what -version- implies
appears to be quite difficult even for developers.
Concretely, in your example, issuing within Stata 9
-version 8.2:- doesn't necessarily set
the clock back to Stata 8.2 in all respects -- even just
in respect of those you have specified in your command.
It just sets the clock back in certain respects when
reproducing Stata's previous behaviour (a) is sensible
and (b) might be desired. Admittedly, StataCorp is doing
all the judging on (a) and (b).
The converse would bloat Stata extraordinarily by
obliging Stata to hold within its code all sorts of branches
to allow old code to be re-used -- even if we are severe
and say (1) no reproduction of bugs allowed and (2) no reproduction
of totally obsolete commands allowed. (But what's obsolete?
Only the other day Allan Reese was using -fit-, a blast from
the past if ever there was one. But it still works as he
remembers it.)
In this case, Stata is set up so that your request to
use -version 8.2- is ignored. You are in Stata 9, really,
and -fcolor()- is allowed, and Stata knows that, so that
Stata presumes that you do not mean what you say. More
often than not, this is really a feature.
The issue is more general. Suppose you write
program myprog
version 8.2
...
end
and include within it, say accidentally, Stata 9 features. Will Stata complain
just because of that? Within Stata 9: No. Within Stata 8.2: Yes.
Confusing, at first sight, because you may think that the -version 8.2-
fixes all and that your friend with 8.2 can use this program.
In short:
1. -version- is only in very limited respects a time machine.
2. The only full and complete return to version # conditions is using
Stata version #.
Nick
[email protected]
Sp�rri-Fahrni Adrian
> I wrote a do-file with Stata9 for someone using 8.2. No
> problem, I thought, and wrote "version 8.2" in one of the first lines.
> Nevertheless, the do-file did not run with Stata8.2.
>
> Here's the command, which did not work (boxplot):
>
> graph box aktmin, medtype(line) over(agegrp) box(1, fcolor(gs12))
>
> This does not run, because the option fcolor doesn't exist in
> Stata8.2, it should be bfcolor.
>
> So, when running
>
> version 8.2: graph box aktmin, medtype(line) over(agegrp)
> box(1, fcolor(gs12))
>
> with Stata9, I should receive a red error line telling me:
> option fcolor() not allowed! Anyway, Stata9 runs this line
> without problem.
>
> Does anybody have an idea, why the command "version 8.2" does
> not work in my example?
*
* 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/