1. generic 
  2.    type Element is (<>); -- any discrete type 
  3.    Init : Element;       -- initial value 
  4.  
  5. package Protected_Element_Generic is 
  6.  
  7.    protected Protected_Element is 
  8.  
  9.       function  Get return Element; 
  10.       procedure Set (E : Element); 
  11.  
  12.       entry Inc; 
  13.       entry Dec; 
  14.  
  15.    private 
  16.       Store : Element := Init; 
  17.  
  18.    end Protected_Element; 
  19.  
  20. end Protected_Element_Generic;