Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does vfp support polymorphism?
Message
De
21/06/2003 14:24:24
 
 
À
20/06/2003 19:21:54
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00802118
Message ID:
00802616
Vues:
41
>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"
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform