Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does vfp support polymorphism?
Message
From
21/06/2003 14:36:15
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00802118
Message ID:
00802617
Views:
37
Still looks "clumsy" to me. And you've effectively destroyed the previous "animal" everytime you activate a different one.

Now, as for the maintenance aspect ... You've created 3 program files already, and will require an additional one for each additional implementation.

As I said, it's easier with an object-oriented language.

>>Also, it doesn't seem to be particularly useful unless you have "objects" ... so there are some language dependencies. Using "scoping rules", I can affect polymorphism in a procedural language, but it's pretty clumsy.
>
>That depends on what you define as "clumsy". I used to do this in 2.6 all the time:
>
>
SET PROCEDURE TO pig
>DO speak
>
>SET PROCEDURE TO cow
>DO speak
>
>
>*pig.prg
>PROCEDURE speak
>?"Oink"
>
>*cow.prg
>PROCEDURE speak
>?"Moo"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform