tpara2.pp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. type
  2. sint16 = smallint;
  3. uint16 = word;
  4. Point = record
  5. case SInt16 of
  6. 0: (
  7. v: SInt16;
  8. h: SInt16;
  9. );
  10. 1: (
  11. vh: array [0..1] of SInt16;
  12. );
  13. end;
  14. Rect = record
  15. case SInt16 of
  16. 0: (
  17. top: SInt16;
  18. left: SInt16;
  19. bottom: SInt16;
  20. right: SInt16;
  21. );
  22. 1: (
  23. topLeft: Point;
  24. botRight: Point;
  25. );
  26. end;
  27. RGBColor = record
  28. red: UInt16;
  29. { magnitude of red component }
  30. green: UInt16;
  31. { magnitude of green component }
  32. blue: UInt16;
  33. { magnitude of blue component }
  34. end;
  35. function test(r: Rect; c1, c2: RGBColor): Rect;
  36. begin
  37. test:= r;
  38. end;
  39. var
  40. r: rect;
  41. c1,c2: rgbcolor;
  42. begin
  43. test(r,c1,c2);
  44. end.