ub0265.pp 495 B

1234567891011121314151617181920212223242526272829
  1. { Old file: tbs0308a.pp }
  2. { problem with objects that don't have VMT nor variable fields OK 0.99.13 (FK) }
  3. unit ub0265;
  4. interface
  5. type
  6. tcourses = object
  7. function index(cName: string): integer;
  8. function name(cIndex: integer): string;
  9. end;
  10. var coursedb: tcourses;
  11. l: longint;
  12. implementation
  13. function tcourses.index(cName: string): integer;
  14. begin
  15. index := byte(cName[0]);
  16. end;
  17. function tcourses.name(cIndex: integer): string;
  18. begin
  19. name := char(byte(cIndex));
  20. end;
  21. end.