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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Record operations (Algebraic Data Types and printing) Date: Mon, 8 Oct 2018 18:03:26 -0500 Organization: JSA Research & Innovation Message-ID: References: <0f5608ef-0038-491c-b15f-f67bcc76fae8@googlegroups.com> <00285ebf-6ede-44da-848f-456930dc7475@googlegroups.com> Injection-Date: Mon, 8 Oct 2018 23:03:26 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="32032"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:54516 Date: 2018-10-08T18:03:26-05:00 List-Id: "AdaMagica" wrote in message news:00285ebf-6ede-44da-848f-456930dc7475@googlegroups.com... >Am Freitag, 5. Oktober 2018 19:46:32 UTC+2 schrieb Henrik Härkönen: > >> Now as I'm playing with the records, I'd like to print them out, just for >> "debugging" purposes. Is there any convenient way to splash them out >> in console? Some sort of default string representation? Seems that >> 'Image attribute works only for scalar types. > >Do it yourself... There is no such default. > >A record may have private (even limited) components. What should a default >for these look like? Well, AI12-0020-1 attempts to answer that question, so it can't be impossible. ;-) [Wait a day or two before looking at it, Steve B. just sent a new version that isn't posted yet.] For the OP: Ada 2020 most likely will have a mechanism to do what you want. But you probably don't want to wait for that to show up in your favorite compiler. So you do in fact have to do it yourself. Randy.