RosettaCodeData/Task/Singleton/Ada/singleton-3.adb

12 lines
300 B
Ada
Raw Permalink Normal View History

2026-04-30 12:34:36 -04:00
package Protected_Singleton is
procedure Set_Data (Value : Integer);
function Get_Data return Integer;
private
protected Instance is
procedure Set(Value : Integer);
function Get return Integer;
private
Data : Integer := 0;
end Instance_Type;
end Protected_Singleton;