[DGD] Re: #Including code.
Felix A. Croes
felix at dworkin.nl
Sat Jan 10 18:48:07 CET 2004
"Troels Therkelsen" <troels at 2-10.org> wrote:
>[...]
> > > a.c:
> > > ----
> > > void test_proto();
> > >
> > > void test_proto() {
> > > print("*** A ***");
> > > }
>[...]
> IOW, if you *don't* prototype test_proto() in a.c then do_stuff1() will
> indeed print "*** A ***". Many people who use function prototypes per
> default (simply because that's how the defacto standard is in C and they
> apply it linearily to LPC aswell) are not aware of this.
The prototype makes no difference. test_proto() is masked by object B,
therefore the one in object B is called, even from object A.
There would be a bug if the prototype <did> make such a difference, but
it is not a bug that exists in DGD.
Regards,
Dworkin
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list