summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/test/cg/tpara2.pp
blob: 7f9c54066fcd9967fe3b0943d78fa9517ee8b64c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
type
  sint16 = smallint;
  uint16 = word;

        Point = record
                case SInt16 of
                0: (
                        v: SInt16;
                        h: SInt16;
                   );
                1: (
                        vh: array [0..1] of SInt16;
                        );
        end;

        Rect = record
                case SInt16 of
                0: (
                        top: SInt16;
                        left: SInt16;
                        bottom: SInt16;
                        right: SInt16;
                   );
                1: (
                        topLeft: Point;
                        botRight: Point;
                   );
        end;

        RGBColor = record
                red:                                    UInt16;                 
                                                { magnitude of red component }
                green:                                  UInt16;                 
                                                { magnitude of green component }
                blue:                                   UInt16;                 
                                                { magnitude of blue component }
        end;

function test(r: Rect; c1, c2: RGBColor): Rect;
begin
  test:= r;
end;

var 
  r: rect;
  c1,c2: rgbcolor;
begin
  test(r,c1,c2);
end.