Re: define class xx twice

Author: Gene Wirchenko

Posted: 2016-11-18 at 12:14:08

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

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/53b9181cdfcb7b82ebe52b51c4179e0e@mtlp000086

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2016 Gene Wirchenko