Guest User

Untitled

a guest
Sep 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. const DOG_ACTION = "rub belly"
  2.  
  3. type Animal
  4. DIM name AS STRING
  5. DIM getAction AS FUNCTION AS STRING
  6. end type
  7.  
  8. type Dog
  9. base AS Animal
  10. declare constructor (name_ as string)
  11. declare function getAction as string
  12. end type
  13.  
  14. constructor Dog (name_ as string)
  15. base.name = name_
  16. base.getAction = PROCPTR(Dog.getAction)
  17. end constructor
  18.  
  19. function Dog.getAction as string
  20. return DOG_ACTION
  21. end function
Add Comment
Please, Sign In to add comment