1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
package body Prot3_Pkg is protected body Prot is function Fn (J : Short_Integer) return Rec is begin return (V1 => J * J, V2 => J); end; procedure Foo (J : Short_Integer) is begin Val := Fn (J); end; end Prot; end Prot3_Pkg;