home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 December / Chip_2001-12_cd1.bin / zkuste / delphi / kompon / d23456 / CAJSCRTP.ZIP / demo_kylix / classtest.ifs < prev    next >
Text File  |  2001-03-28  |  465b  |  30 lines

  1. Program IFSTest;
  2. type
  3.   u = class
  4.   public
  5.     f: string;
  6.     function getf: string;
  7.     procedure setf(s: string);
  8.     property test: string read getf write setf;
  9.   end;
  10. function u.getf: string;
  11. begin
  12.   writeln('GETF!');
  13.   result := f;
  14. end;
  15. procedure u.setf(s: string);
  16. begin
  17.   Writeln('SETF');
  18.   f := s;
  19. end;
  20.  
  21. var
  22.   c: U;
  23. Begin
  24.   c :=  u.create;
  25.   c.f := ' eee ';
  26.   writeln(c.test);
  27.   c.test := '3ee';
  28.   writeln(c.test+'.'+c.f);
  29. End.
  30.