>reading a recent post, I read ( then proved ) that if you declear a private var in you main program it will have golbal scope.
>
>WHY!!!?!?!?!
In VFP a private variable is scoped to the program that created it, and any subsequent program called from within this program. So, if you declare a PRIVATE variable in you main program is the same as declaring it GLOBAL.
>I don't understand why the deviation on something so primitive.
I think is for compatibility with previous versions of xBase languages. First versions of xBase languages only had public and private variables and "private" was the defaul scope.
However, now you can declare your variables as LOCAL and achieve the behavior that you are looking for.
Hector Correa