Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access and Assign vs. OOSE
Message
De
28/10/1998 13:23:24
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00149911
Message ID:
00151777
Vues:
47
Hiya JimB...

>Of course if the horse has a swim method and the arguments included what side should be down a simple Horse.Swim("Back") could do the trick. :-)
DEFI CLASS mammal AS custom
   MammalType=""
   FUNC Init
      LPARMS cMammalType
      THIS.MammalType=cMammalType
      RETURN
   ENDFUNC
   FUNC Swim(cDirection)
      cResults="Lived"
      IF cDirection="Back"
         IF THIS.MammalType="Horse"
            cResults="Drowned"
         ENDIF
      ENDIF
      RETURN (cResults)
   ENDFUNC
ENDDEFINE

oHorse=CREATEOBJECT("Mammal","Horse")
cResult=oHorse.Swim("Back")
?cResult

Drowned
Damn...I guess it would drown :-)
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform