Re: Two 'Output questions
- From: Matthew Heaney <mheaney@xxxxxxx>
- Date: Thu, 30 Jun 2005 14:58:07 -0400
Alex R. Mosteo wrote:
Hello everybody,
a) Is there any guarantee that 'Output is implemented like...?
1. Write bounds/Tag 2. Call to 'Write
I see that the containers provided with gnat gap 2005 have 'write redefined but not 'output.
Yes, because there's no dope for the container types (as there would be for an unconstrained array, for example), and hence only 'Write need to defined.
(But do note that I do use ET'Output in the implementation of the 'Write for the indefinite containers, since there you really do need to write out dope.)
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.
There's nothing gnat-specific about what I did for the containers. I'm assuming that the default 'Output is implemented in terms of the 'Write defined for the type (but I would have to look this up to be sure).
.
- References:
- Two 'Output questions
- From: Alex R. Mosteo
- Two 'Output questions
- Prev by Date: Re: Virtual Components in Ada and Ruby
- Next by Date: Re: How difficult is ada to learn?
- Previous by thread: Two 'Output questions
- Next by thread: Re: Two 'Output questions
- Index(es):