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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: hreba Newsgroups: comp.lang.ada Subject: Re: Serial port configuration Date: Mon, 07 Apr 2014 08:44:58 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net Ki5QFvFN592bqveE4VCf6AuQ79Zf/yoU5PXWaVfbdIQyOPRMVi Cancel-Lock: sha1:Ekcy5wdgy0jeg42/CSUVQLfA3+c= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:19180 Date: 2014-04-07T08:44:58-03:00 List-Id: On 04/06/2014 03:57 PM, Simon Wright wrote: > 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?). Thanks for the hints. > > In fact, why not just copy the contents of the GNAT version and change > the bits you need to? > This might not be the most elegant solution, but the one with the least effort. I think I'll try that. -- hreba