OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gnat.dg/] [discr20.ads] - Rev 304

Compare with Previous | Blame | View Log

package Discr20 is
 
  Size : Integer;
 
  type Name is new String (1..Size);
 
  type Rec is record
     It : Name;
  end record;
 
  type Danger is (This, That);
  type def (X : Danger := This) is record
    case X is
       when This => It : Rec;
       when That => null;
       end case;
   end record;
 
   type Switch is (On, Off);
   type Wrapper (Disc : Switch := On) is private;
   function Get (X : Wrapper) return Def;
 
private
   type Wrapper (Disc : Switch := On) is record
      Case Disc is
         when On  => It : Def;
         when Off => null;
      end case;
   end record;
 
end Discr20;
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.