From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,904f3551267aacb0,start X-Google-Attributes: gid103376,public From: Dale Stanbrough Subject: How to hide instantiation of Direct_IO? Date: 1997/02/11 Message-ID: <5dqt5n$j3s$1@goanna.cs.rmit.edu.au>#1/1 X-Deja-AN: 218698132 Distribution: world Content-Type: text/plain; charset=ISO-8859-1 X-XXMessage-ID: Organization: Royal Melbourne Institute of Technology Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1997-02-11T00:00:00+00:00 List-Id: I'ld like to develop a package on top of the rather low level Direct_IO, but prevent access to the instantiation of Direct_IO itself. I could do this by instantiating direct_io in a private part of a package, and then declare higher level routines in child packages which for the most part, simply forward the work onto the equivalent direct_io routines. However there seems no way to declare a type Count for my higher level package such that it has the same range as that defined in Direct_IO (type Count is 0..implementation-defined) - I can't reference the private instantiation - 'cos it's private! Is there _any_ way around this problem? The _only_ solution I can think of is not to declare a type, and just have a rather yucky function... function Max_File_Size return Integer; -- truly non portable! function Size(File : My_File_Type) return Integer; Dale