
'CLASSES AND METHODS
'


  class stat
  ==========
    method sum() as double
    method average() as double
    da(100) as double
    dn as long
  end class
#recordof stat

  methods of stat
  '==============
    
    method sum() as double
      int i
      for i = 1 to dn
        method += da(i)
      next
    end method
    
    method average() as double
      method = sum() / dn
    end method
     
  end methods
  
  '====
  'TEST
  '====
  
  dim s as stat
  
  s.da={2,4,6,8,10,12,14,16,18}
  s.dn=9
  print `Sum: ` str(s.sum()) `       Average: ` str(s.average)
  

