comp.lang.ada
 help / color / mirror / Atom feed
From: adam@irvine.com
Subject: How to Use Abstract Data Types (correction)
Date: 1998/04/22
Date: 1998-04-22T00:00:00+00:00	[thread overview]
Message-ID: <6hm67u$bdj$1@nnrp1.dejanews.com> (raw)


Whoops, in my previous posting I forgot to declare my procedures as
abstract.  Thus, my package spec should be:

    package Library_Package is

        type Library is abstract tagged null record;
        type Book is abstract tagged null record;

        type Scan_Info is abstract tagged null record;

        ... procedure(s) to set up a new Library object

        procedure Scan_By_Title (Lib            : in Library;
                                 Reg_Expression : in String;
                                 Scan           : out Scan_Info;
                                 RE_Error       : out Boolean)
            is abstract;
        function More_Books (Scan : Scan_Info) return Boolean
            is abstract;
        procedure Next_Book (Scan     : in out Scan_Info;
                             Bk       : out Book)
            is abstract;
        procedure Close_Scan (Scan : in out Scan_Info)
            is abstract;

        ... etc.

    end Library_Package;

                                -- Adam


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading




                 reply	other threads:[~1998-04-22  0:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox