From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Better way to fill Storage_IO? Date: Wed, 19 May 2021 21:25:56 +0200 Organization: Adalog Message-ID: References: <3cfe02b8-18d3-4673-b808-48ad29092517n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 19 May 2021 19:25:55 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="ff5b2d12dd419f7edcb4d1a7a5d231c6"; logging-data="28764"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lYJSfoN91yCiFqqDb0bPw" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 Cancel-Lock: sha1:ONtyOrcECs6tHzdJXocAVpjFcMI= In-Reply-To: Content-Language: fr Xref: reader02.eternal-september.org comp.lang.ada:62013 List-Id: Le 19/05/2021 à 10:26, Björn Lundin a écrit : > Given the above I do prefer > > > Text_IO.Put_Line ("Next is " & Next_Location'Image); > > over > > Text_IO.Put_Line ("Next is " & > Coded_Values.WCS_Next_Location_Type_Type'Image(Next_Location)); Interesting example. When I define a type that I want to be able to print, I define also (in the same place) an instantiation of Integer_IO/Enumeration_IO, and I would write: Put ("Next is "); Put (Next_Location); New_Line; 'Image was not intended for regular IO. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52 https://www.adalog.fr