terecs_u1.pp 511 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. { %norun }
  2. unit terecs_u1;
  3. {$mode delphi}
  4. interface
  5. type
  6. HWND = integer;
  7. TFoo = record
  8. hWnd : HWND;
  9. private
  10. F1: Integer;
  11. F2: Byte;
  12. public
  13. type
  14. TBar = Integer;
  15. const
  16. C: TBar = 1;
  17. var
  18. F3: TBar;
  19. F4: Byte;
  20. function Test(n: TBar): TBar;
  21. class function Test1(n: TBar): TBar;
  22. end;
  23. implementation
  24. function TFoo.Test(n: TBar): TBar;
  25. begin
  26. Result := F3 + F4 + n;
  27. end;
  28. class function TFoo.Test1(n: TBar): TBar;
  29. begin
  30. Result := C + n;
  31. end;
  32. end.