procedure limfunction is
package pkg is
type T is limited private;
function init(x, y: integer) return T;
private
type T is record a, b: integer; end record;
end pkg;
package body pkg is
function init(x, y: integer) return T is
begin
-- Extended return allows limited private constant assignment
return result: T do
result := (a => x, b => y);
end return;
-- return result: T := (a => x, b => y); -- Shorter version
end init;
end pkg;
use pkg;
theT1: constant T := init(1,2);
begin
null;
end limfunction;