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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!APLPY.ARPA!gary From: gary@APLPY.ARPA.UUCP Newsgroups: comp.lang.ada Subject: Re: VAX Ada sequential IO and Direct IO Message-ID: <8704140117.AA13151@aplpy.arpa> Date: Mon, 13-Apr-87 20:17:39 EST Article-I.D.: aplpy.8704140117.AA13151 Posted: Mon Apr 13 20:17:39 1987 Date-Received: Wed, 15-Apr-87 04:37:01 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet List-Id: > Has anyone had problems with VAX Ada sequential_io and direct_IO when > instantiated with a discriminated record type which has an unconstrained > component. I keep getting use_error raised when doing a create or open. > > example > > > type foo(a : integer) is > record > f1 : string(1..a); > end record; > > even if I restrict the range of 'a' by using a subtype of integer, or > create an integer type with a restricted range I still get a use_error. > In addition to the use error, an RMS error is listed as max record size > exceeded. > > ... Tony Alden > (TRW) > > We've been able to use sequential and direct io with discrimant records successfully by specifying a default discriminant value, i.e. the records have to be "constrained" at time of instantiation of io package. You might try something like the following: type foo(a : integer := MAXLENGTH) is record f1 : string(1..a); end record; package rec_io is new sequential_io(foo); Good Luck, Gary Gafke gary@aplpy.arpa or seismo!mimsy!aplcen!gary or (301) 953-6999