[DGD]Scope (::) operator and Kernel lib wiztool
Erwin Harte
harte at xs4all.nl
Mon Jun 11 06:03:21 CEST 2001
On Sun, Jun 10, 2001 at 08:47:35PM -0700, Noah Lee Gibbs wrote:
[...]
> Does anybody know if this is just a bug in the Kernel lib or if
> functions called with the scope operator call to the parent before trying
> the auto object?
Not a bug.
The '::' operator (if you can call it that) is used to call the
inherited function, inside the auto-object that just means the kfun
version effectively. The '::' operator does not try more than one
possibility, there is no ambiguity in what it's going to do.
If you inherit objects 'foo.c' and 'bar.c' and both define a function
called 'blah()', you need to label the inherited objects, DGD does not
use implicit labeling, and redefine blah() to call one or the other,
whichever you think is appropriate. For instance:
inherit o_foo "foo";
inherit o_bar "bar";
void blah() {
o_foo :: blah();
o_bar :: blah();
}
Hope this helps,
Erwin.
--
Erwin Harte <harte at xs4all.nl>
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list