blob: 7ded8366675be58e0a310199529ddfb6c82e1731 (
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
|
entity ent is
end entity;
architecture a of ent is
type ivec is array (integer range -2 to 2) of integer;
function fun1 return ivec is
begin
return (0,1,2,3,4);
end function;
function fun2(arg : integer) return ivec is
begin
return (0,1,2,3,4);
end function;
begin
main : process
begin
report integer'image(fun1'length);
report integer'image(fun2(2)'length);
report integer'image(fun1'left);
report integer'image(fun2(2)'left);
report integer'image(fun1'right);
report integer'image(fun2(2)'right);
wait;
end process;
end architecture;
|