At 00:57 2016-11-18, "Fernando D. Bozzo" fdbozzo@gmail.com wrote:
Yes, this is the same behaviour as for procedures, the last defined or loaded overwrites the previous.
Maybe. It is undefined behaviour so you can not count on it being one way or the other.
This is because there can't be more than one procedure/class with the same name on memoty at the same time.
A questionable assumption. What about do someproc in locationa do someproc in locationb Since it is not defined exactly what VFP stores in memory codewise, it is not impossible that both could be.
In the case of classes you can use NewObject to select from which library instantiate a class definition, but for multiple objects this is more slower than createobject.
Having been bit by a duplicate method name some months back, I think there really should be a compiler error message for duplicates.
[snipped previous]
Sincerely,
Gene Wirchenko
Hi Gene:
2016-11-18 19:14 GMT+01:00 Gene Wirchenko genew@telus.net:
At 00:57 2016-11-18, "Fernando D. Bozzo" fdbozzo@gmail.com wrote:
Yes, this is the same behaviour as for procedures, the last defined or loaded overwrites the previous.
Maybe. It is undefined behaviour so you can not count on it beingone way or the other.
This is because there can't be more than one procedure/class with the same
name on memoty at the same time.
A questionable assumption. What about do someproc in locationa do someproc in locationbSince it is not defined exactly what VFP stores in memory codewise, it is not impossible that both could be.
That is precisely why I've talked about "procedure/class on memory", because the only way to have them loaded on memory is with SET PROCEDURE and SET CLASSLIB, and in this cases the last one is the winner.
"do someproc in locationx" or "NewObject" does not use nothing "in memory", because they load from the indicated resource directly, hence, does not apply,
In the case of classes you can use NewObject to select from which library
instantiate a class definition, but for multiple objects this is more slower than createobject.
Having been bit by a duplicate method name some months back, I thinkthere really should be a compiler error message for duplicates.
[snipped previous]
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]