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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ff8a65471f12b057 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Thu, 30 Jun 2005 14:05:09 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <42C43B48.1040802@mailinator.com> Subject: Re: Two 'Output questions Date: Thu, 30 Jun 2005 14:08:16 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-Km9S4zVdFGkK5NrFYTEnnDsc73wrP9GkfofFPvRfLnuoX+0e89QwzvFdu8FMhLvS/bufHZKQFO58vzv!ZGgZenaTjevMc6GOziJBlHGm9bh368UHqquk9gsG0ZJ8iZKadilQdxvRkJ7RUNYlpa0Jdao7+KAY X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.31 Xref: g2news1.google.com comp.lang.ada:11774 Date: 2005-06-30T14:08:16-05:00 List-Id: "Alex R. Mosteo" wrote in message news:42C43B48.1040802@mailinator.com... > Hello everybody, > > a) Is there any guarantee that 'Output is implemented like...? > > 1. Write bounds/Tag > 2. Call to 'Write No, because it might be inherited (untagged types only) or redefined. But if it is not, the default implementation is described by 13.13.2(25-27), and it says the same as the above. > I see that the containers provided with gnat gap 2005 have 'write > redefined but not 'output. While I don't see reasons to use 'output on > definite types (?), I'm guessing gnat does so because of a). I don't see > any explanation in the RM, so if I'm right it may be still > gnat-dependent. I suppose it's handy too to not have to redefine both > 'Output and 'Write when the latter is enough. Like I said, see 13.13.2(25-27). > b) Is there any way to call the default 'Output attribute once you have > redefined it? The reason for this is that I have a variant record in > which just one of the variations needs special treatment... I have ideas > for workarounds but I'm now just curious. If the type is derived, you can call the operation of the parent type in the obvious way. You might be able to rename the original operation before the redefinition (the "squirreling away" type of rename, which certainly works for overriding). But otherwise it is gone. Randy.