Author Topic: Friendly Objects  (Read 2587 times)

0 Members and 1 Guest are viewing this topic.

Charles Pegge

  • Guest
Friendly Objects
« on: October 03, 2010, 03:34:41 AM »

Code: [Select]

  '===========
  class person
  '===========

  private

  name as string

  public

  method NameAs(s as string)
    name=s
  end method

  method Hello()
    print "Hello " name "!"
  end method

  method Goodbye()
    print "Goodbye " name "!"
  end method

  end class



  person JRS
  JRS.NameAs ("John")
  JRS.hello
  JRS.goodbye


JRS

  • Guest
Re: Friendly Objects
« Reply #1 on: October 03, 2010, 07:02:25 AM »
Sweet!

I'm honored to be coming and going in your example.  :)