bug0308a.pp 389 B

1234567891011121314151617181920212223242526
  1. unit bug0308a;
  2. interface
  3. type
  4. tcourses = object
  5. function index(cName: string): integer;
  6. function name(cIndex: integer): string;
  7. end;
  8. var coursedb: tcourses;
  9. l: longint;
  10. implementation
  11. function tcourses.index(cName: string): integer;
  12. begin
  13. index := byte(cName[0]);
  14. end;
  15. function tcourses.name(cIndex: integer): string;
  16. begin
  17. name := char(byte(cIndex));
  18. end;
  19. end.