I believe I may have found a small problem with -cf- when one or both
of the files being compared contains a variable named _merge.
Consider the following:
input y
1
2
3
end
save foo
gen _merge = y
If I now use -cf- to compare the data in memory to the file "foo", I get:
. cf _all using foo
_merge: 2 mismatches
when in principle I should get:
. cf _all using foo
_merge: does not exist in using
Alternatively, if I save the file again and then compare it against
itself, I get:
. save foo, replace
file foo.dta saved
. cf _all using foo
_merge already defined
r(110);
A quick look at cf.ado suggests that the problem is caused by -cf-'s
use of -merge-, and that using the _merge option to specify a
temporary variable would be one way to solve the problem.