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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Serial port configuration Date: Sun, 06 Apr 2014 19:57:04 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx05.eternal-september.org; posting-host="a0d4eb314a073b71869f2de305ad0700"; logging-data="21774"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19o7yjHhHQ/JeLK0tf/2TvpFP0LKolwFlA=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:Nz3qRi68tqZX9t7htMGTlvC5kjY= sha1:GjUBt2Elm/IsGuOyWOp2S0IkoCQ= X-Original-Bytes: 1619 Xref: number.nntp.dca.giganews.com comp.lang.ada:185564 Date: 2014-04-06T19:57:04+01:00 List-Id: hreba writes: > package body SerAux is > > type Port_Data is new int; > type Port_Data_Access is access Port_Data; > type Port is new Ada.Streams.Root_Stream_Type with record > H : Port_Data_Access; > end record; The declaration of type Port needs to be in the spec; and you need to have the spec of Read there also. > overriding procedure Read > (--Port : in out Serial_Port; > Port : in out Port; You can't use the name Port twice like that. I'd suggest using Serial_Port for the type name, like the original (why change?). In fact, why not just copy the contents of the GNAT version and change the bits you need to?