Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access and Assign vs. OOSE
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00149911
Message ID:
00151812
Views:
45
Gee John, isn't it amazing how this thread has evolved? Or is it devolved?

>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 :-)
"It is an important and popular fact that things are not always what they seem. For instance, on the planet Earth, man had always assumed that he was more intelligent than dolphins because he had achieved so much -- the wheel, New York, wars and so on -- whilst all the dolphins had ever done was muck about in the water having a good time. But conversely, the dolphins had always believed that they were far more intelligent than man -- for precisely the same reasons." - Douglas Adams
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform