> > Hmmm... I am yet to see someone declaring PUBLIC memvars inside an object's definition!
> > Have you seen it, ever?
>
>
> I have, too. I've been working for several years on modifications to an application where the first thing in the Load method of every form is the declaration of public variables and the last thing in the Unload is the release of those same variables.
>
> The person who wrote this application didn't know about buffering or about custom properties and methods. So, the public variables are used as ControlSources for the controls, and these forms call out to PRGs rather than having custom methods.
>
> I'm gradually replacing these forms with properly designed forms.
>
> Tamar
This is not the worst case, Tamar, I've seen worse: ALL memvars appear undeclared (implicit memvar declaration) in the program! I've seen it in FPD (inherited), I've seen it in VFP (by my co-worker).
With the program in FPD (could only be declared PRIVATE, no LOCAL then, in 1994) - I nearly shut down the operations: one of my functions, where I declared some memvar, called some existing sub in which my predecessor introduced his memvar with the same name, without declaration, and assigned it the value of the same data type (imagine that). It took me couple hours to find out what was going on - and then couple months of sweat and pain (and much cursing - albeit in Russian, so no one would understand (:>) ) of going through the entire program (40K+ lines of code) I've inherited, declaring as many of these memvars as I could to stabilize this program. Only then I could move on with my own projects at hands (which amounted to another 20K+ lines of code, bar comments, at the end).
Regards,
Ilya