First page Back Continue Last page Summary Graphics

Sample Code

  • Pascal Code:
  • unit WlugExample;
  • interface
  • uses classes;
  • type
  • TWlug = class(TObject)
  • private
  • x: integer;
  • members: TStringList;
  • public
  • procedure addMember( member: string = 'Andy');
  • function count: integer;
  • constructor Create;
  • end;
  • implementation
  • constructor Twlug.Create;
  • begin
  • members := TStringList.Create();
  • end;
  • procedure TWLug.addMember( member: String);
  • begin
  • members.add(member);
  • end;
  • function TWlug.count: integer;
  • begin
  • result := members.count;
  • end;
  • end.