comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: In Plain Text: Tags.Internal_Tag(String'Input(Stream)) ??
Date: Fri, 29 Dec 2000 03:04:17 GMT
Date: 2000-12-29T03:04:17+00:00	[thread overview]
Message-ID: <RaT26.52882$A06.1566788@news1.frmt1.sfba.home.com> (raw)
In-Reply-To: 3A4B557F.F167C8E@home.com

>This suggests that I have to define my own S'Class'Input()
>instead. This would allow me to read the tag in, in any way I
>please, but then how do I proceed from there? How does the
>Ada S'Class'Input() dispatch once the external tag is known?
  It calls A'Input() if the data indicated type A, or B'Input() if
the data indicated type B, etc.
  So if you can use
     for A'External_Tag use "RIFF";
statements to cover all your tags, you needn't override S'Class'Input.
If your external way of specifying a type is too complex for that,
you will have to override S'Class'Input, and your code will have to
know about all the possible external tags and it will have to call
A'Input() or B'Input() or C'Input() as needed.
  Quite independently, if the external data organization doesn't
happen to match what your compiler expects, say because bounds are
stored differently, you'll have to override A'Input et al.
  As has been pointed out, "For elementary types, the representation
in terms of stream elements is implementation defined."  You may
be unpleasantly surprised.  The order of calls for a composite type
is specified though, so if you write overrides for all the elementary
types, and any composite types that differ in data layout order,
you should be in good shape.



  parent reply	other threads:[~2000-12-29  3:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3A4AC329.9C2A311A@home.com>
2000-12-28  6:19 ` Tags.Internal_Tag(String'Input(Stream)) ?? tmoran
2000-12-28 15:06   ` Warren W. Gay VE3WWG
2000-12-28 15:02 ` In Plain Text: " Warren W. Gay VE3WWG
2000-12-28 15:54   ` Ted Dennison
2000-12-28 18:32     ` Warren W. Gay VE3WWG
2000-12-28 19:44       ` Ted Dennison
2000-12-29  2:20         ` Warren W. Gay VE3WWG
2000-12-29  3:20           ` tmoran
2000-12-29  3:04   ` tmoran [this message]
2000-12-29  5:29     ` Ada0x Enhancement? Was: " Warren W. Gay VE3WWG
2000-12-29  7:11       ` tmoran
2000-12-29 14:32         ` Warren W. Gay VE3WWG
2000-12-30  5:55       ` External_Tag: Why? was " tmoran
2000-12-31 22:17         ` Randy Brukardt
2001-01-01 16:50           ` Warren W. Gay VE3WWG
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox