Directory: double These files illustrate inheritance by using tagged types as well as child packages. A generic list package defines type pointer as access to the class of listnode. Listnode is a tagged type, which is extended with a "previous" pointer to provide type dlistnode, a node in a doubly-linked list. gnat version 2.06 for DOS had trouble with the visibility rules for child packages, so I could not compile these files under it. I was able to compile them successfully with version 3.0 at TRI-Ada, and after getting GNAT version 3.00w (Sparc-Sun-Solaris) I compiled them locally. Note that the files had to use different names to run under Solaris, but I listed them here with their DOS names as I expect they will be compilable under version 3.0 of GNAT for DOS when it becomes available. I can't "with" both listn.io and listn.dbl.io in the same test program, since the linker has problems with it. The test program is made to work by using only the io package for singly-linked lists, since doubly- linked lists are printed in the same way. The files include: listn.ads define a generic (by element type) list package, listn.adb providing constructors, selectors, testers, and mutators int_io.ads an instantiation of text_io.ineger_io for type Integer intlistn.ads instantiates listn for integer elements listn-io.ads define a generic child package of the list package that listn-io.adb requires an additional parameter, a Put on the element type, and defines a Put on lists. intlisio.ads instantiates the io child for integer lists listndbl.ads define a generic child package of the list package that listndbl.adb extends the listnode to include a previous pointer, creating doubly-linked lists intlidbl.ads instantiates the doubly-linked list package for integers lisdblio.ads define a generic child package of the doubly-linked list lisdblio.adb package, taking an additional generic parameter, a Put on the element type, and providing a Put for the doubly-linked lists of that element type. intdblio.ads instantiates the doubly-linked io package for integers. (This is where the older version of gnat complains about listn.dbl.io. It claims that Pointer, IsEmpty, First, and Rest are not directly visible. These are all defined in the grandparent generic package listn. listn is instantiated to intlistn, listn.dbl is instantiated to intlistn.dbl (in intlidbl.ads), then this file instantiates listn.dbl.io to intlistn.dbl.io. ) chkdbl.adb tests packages above by creating, modifying, and printing both singly and doubly-linked lists