subtype S1 is T1 range 1..10;
procedure P(X : in S1); -- P is a primitive subprogram
type T2 is new T1 range 11..20;
-- implicitly declared:
-- procedure P(X : in T2'Base range 1..10);
-- X cannot be in T2'First .. T2'Last
type Midweek is new Day range Tue .. Thu; -- see 3.5.1
type Counter is new Positive; -- same range as Positive
-- the inherited subprograms have the following specifications:
-- procedure Get_Key(K : out Special_Key);
-- function "<"(X, Y : Special_Key) return Boolean;
type T is (A, B, C, D);
function F( X : T := A ) return Integer;
type NT is new T;
--inherits F as
--function F( X : NT := A ) return Integer;
--in Ada 9X only
...
end P;
...
use P; --Only one declaration of F from P is use-visible in
--Ada 83; two declarations of F are use-visible in
--Ada 9X.
begin
...
if F > 1 then ... --legal in Ada 83, ambiguous in Ada 9X