comp.lang.ada
 help / color / mirror / Atom feed
* Re: Tags.Internal_Tag(String'Input(Stream)) ??
       [not found] <3A4AC329.9C2A311A@home.com>
@ 2000-12-28  6:19 ` tmoran
  2000-12-28 15:06   ` Warren W. Gay VE3WWG
  2000-12-28 15:02 ` In Plain Text: " Warren W. Gay VE3WWG
  1 sibling, 1 reply; 15+ messages in thread
From: tmoran @ 2000-12-28  6:19 UTC (permalink / raw)


> <br>instead. This would allow me to read the tag in, in any way I
> <br>please, but then how do I proceed from there? How does the
> <br>Ada S'Class'Input() dispatch once the external tag is known?

  Is something along this line what you are looking for?

 function Get return S'class is
 begin
   get_external_type_indicator;
   case external_type_indicator is
     when A =>
       declare
         Result : S_Child_A;
       begin
         get_A_stuff_into_Result;
         return Result;
       end;
     when B =>
       declare
         Result : S_Child_B;
       begin
         get_B_stuff_into_Result;
         return Result;
       end;
   end case;
 end Get;



^ permalink raw reply	[flat|nested] 15+ messages in thread

* In Plain Text: Tags.Internal_Tag(String'Input(Stream)) ??
       [not found] <3A4AC329.9C2A311A@home.com>
  2000-12-28  6:19 ` Tags.Internal_Tag(String'Input(Stream)) ?? tmoran
@ 2000-12-28 15:02 ` Warren W. Gay VE3WWG
  2000-12-28 15:54   ` Ted Dennison
  2000-12-29  3:04   ` tmoran
  1 sibling, 2 replies; 15+ messages in thread
From: Warren W. Gay VE3WWG @ 2000-12-28 15:02 UTC (permalink / raw)


(Apologies re: the prior post in HTML, here again in plain:)

I want to read in WAVE file chunks using the S'Class'Input() facility. 
Each WAVE chunk starts with a String(1..4) that identifies the chunk. 
I have set up the external representation of each tagged record to 
match this chunk ID, for example: 

   for Riff_Form'External_Tag use "RIFF"; 

However, the difficulty now is that I want to override the way the 
Tag is read in (the Tag length is ALWAYS 4 bytes here). The Ada 
implementation attempts to read in the lower bound and upper 
bound of the Tag string first [ See ref to the note about 
Tags.Internal_Tag(String'Input(Stream))  below ]. 

I would prefer not to override String'Input since this would affect 
it's behavour for all strings. 

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? 

I.E. how do I "dispatch to the subprogram denoted by the Input 
attribute of the specific type identified by the internal tag; returning 
that result."???? 

I tried to find the GNAT implementation of this, but so far have been 
unsuccessful. 

Thanks in advance... 

From the ARM : 
http://www.adapower.com/rm95/arm95_214.html#SEC214 

1.S'Class'Input 

   S'Class'Input denotes a function with the following specification: 

   1.function S'Class'Input( 
             Stream : access Ada.Streams.Root_Stream_Type'Class) 
             return T'Class 

    2.First reads the external tag from Stream and determines the corresponding 
       internal tag (by calling Tags.Internal_Tag(String'Input(Stream)) -- See 
       section 3.9 Tagged Types and Type Extensions.) and then dispatches to 
       the subprogram denoted by the Input attribute of the specific type identified by 
       the internal tag; returns that result. 

-- 
Warren W. Gay VE3WWG
http://members.home.net/ve3wwg



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Tags.Internal_Tag(String'Input(Stream)) ??
  2000-12-28  6:19 ` Tags.Internal_Tag(String'Input(Stream)) ?? tmoran
@ 2000-12-28 15:06   ` Warren W. Gay VE3WWG
  0 siblings, 0 replies; 15+ messages in thread
From: Warren W. Gay VE3WWG @ 2000-12-28 15:06 UTC (permalink / raw)


tmoran@acm.org wrote:
> 
> > <br>instead. This would allow me to read the tag in, in any way I
> > <br>please, but then how do I proceed from there? How does the
> > <br>Ada S'Class'Input() dispatch once the external tag is known?
> 
>   Is something along this line what you are looking for?

If I use the S'Class'Input() "default" procedure, then I don't have to
specify all the specific cases for each class, as you indicated as
cases A and B etc. I am trying to avoid having to identify each and 
every class (RIFF files have many).

Having something more automatic, means that I can derive more classes
without having to go back and update the "input" procedure.

-- 
Warren W. Gay VE3WWG
http://members.home.net/ve3wwg



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: In Plain Text: Tags.Internal_Tag(String'Input(Stream)) ??
  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-29  3:04   ` tmoran
  1 sibling, 1 reply; 15+ messages in thread
From: Ted Dennison @ 2000-12-28 15:54 UTC (permalink / raw)


In article <3A4B557F.F167C8E@home.com>,
  "Warren W. Gay VE3WWG" <ve3wwg@home.com> wrote:
> (Apologies re: the prior post in HTML, here again in plain:)
>
> I want to read in WAVE file chunks using the S'Class'Input() facility.
> Each WAVE chunk starts with a String(1..4) that identifies the chunk.
> I have set up the external representation of each tagged record to
> match this chunk ID, for example:
>
>    for Riff_Form'External_Tag use "RIFF";
>
> However, the difficulty now is that I want to override the way the
> Tag is read in (the Tag length is ALWAYS 4 bytes here). The Ada
> implementation attempts to read in the lower bound and upper
> bound of the Tag string first [ See ref to the note about
> Tags.Internal_Tag(String'Input(Stream))  below ].
>
> I would prefer not to override String'Input since this would affect
> it's behavour for all strings.

You might have better luck creating your own custom stream type for WAV
data.

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com
http://www.deja.com/



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: In Plain Text: Tags.Internal_Tag(String'Input(Stream)) ??
  2000-12-28 15:54   ` Ted Dennison
@ 2000-12-28 18:32     ` Warren W. Gay VE3WWG
  2000-12-28 19:44       ` Ted Dennison
  0 siblings, 1 reply; 15+ messages in thread
From: Warren W. Gay VE3WWG @ 2000-12-28 18:32 UTC (permalink / raw)


Ted Dennison wrote:
> 
> In article <3A4B557F.F167C8E@home.com>,
>   "Warren W. Gay VE3WWG" <ve3wwg@home.com> wrote:
> > (Apologies re: the prior post in HTML, here again in plain:)
> >
> > I want to read in WAVE file chunks using the S'Class'Input() facility.
> > Each WAVE chunk starts with a String(1..4) that identifies the chunk.
> > I have set up the external representation of each tagged record to
> > match this chunk ID, for example:
> >
> >    for Riff_Form'External_Tag use "RIFF";
> >
> > However, the difficulty now is that I want to override the way the
> > Tag is read in (the Tag length is ALWAYS 4 bytes here). The Ada
> > implementation attempts to read in the lower bound and upper
> > bound of the Tag string first [ See ref to the note about
> > Tags.Internal_Tag(String'Input(Stream))  below ].
> >
> > I would prefer not to override String'Input since this would affect
> > it's behavour for all strings.
> 
> You might have better luck creating your own custom stream type for WAV
> data.

I am in the process of doing that very thing. However, I am looking for
ways to more elegantly read in the various chunks (tagged records) from
the stream. S'Class'Input() comes tantalizingly close.

-- 
Warren W. Gay VE3WWG
http://members.home.net/ve3wwg



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: In Plain Text: Tags.Internal_Tag(String'Input(Stream)) ??
  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
  0 siblings, 1 reply; 15+ messages in thread
From: Ted Dennison @ 2000-12-28 19:44 UTC (permalink / raw)


In article <3A4B86B4.DB440BF5@home.com>,
  "Warren W. Gay VE3WWG" <ve3wwg@home.com> wrote:
> Ted Dennison wrote:
> > You might have better luck creating your own custom stream type for
> > WAV data.
>
> I am in the process of doing that very thing. However, I am looking
> for ways to more elegantly read in the various chunks (tagged records)
> from the stream. S'Class'Input() comes tantalizingly close.

So you are saying that you have a nice custom stream of unstructured
data, but you don't want to be able to read (or perhaps write) just any
type of data from it in the normal way? Instead it has a strict
structure you have to adhere to, which you don't have control over?

Probably what you should be doing is calling the stream's
Ada.Streams.Read routine directly from your own custom procedure (*not*
from an attribute). Otherwise you'll have to permanentaly specify (in
some cases, changing) how every type you use is read and written to and
from all streams.

Streams are really best for:
  o  hetrogenious data
  o  unstructured data (no record boundries)
  o  data written *and* read from Ada
  o  writer and reader programs use same stream source files
  o  data written and read from code using the same compiler
  o  data written and read from code using the same platform

The less of these bullets you can check off, the more trouble you are
going to have. If you can't check off at least two, you are in big trouble.

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com
http://www.deja.com/



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: In Plain Text: Tags.Internal_Tag(String'Input(Stream)) ??
  2000-12-28 19:44       ` Ted Dennison
@ 2000-12-29  2:20         ` Warren W. Gay VE3WWG
  2000-12-29  3:20           ` tmoran
  0 siblings, 1 reply; 15+ messages in thread
From: Warren W. Gay VE3WWG @ 2000-12-29  2:20 UTC (permalink / raw)


Ted Dennison wrote:
> In article <3A4B86B4.DB440BF5@home.com>,
>   "Warren W. Gay VE3WWG" <ve3wwg@home.com> wrote:
> > Ted Dennison wrote:
> > > You might have better luck creating your own custom stream type for
> > > WAV data.
> >
> > I am in the process of doing that very thing. However, I am looking
> > for ways to more elegantly read in the various chunks (tagged records)
> > from the stream. S'Class'Input() comes tantalizingly close.
> 
> So you are saying that you have a nice custom stream of unstructured
> data, but you don't want to be able to read (or perhaps write) just any
> type of data from it in the normal way? Instead it has a strict
> structure you have to adhere to, which you don't have control over?

The problem (at a high level) is a simple one: I want to read in
a tagged record from a stream -- which can be any one of a family
of tagged records based upon some root tagged type (base class in
C++ parlance).

For example, I might have a header record like:

type Chunk_Hdr is tagged -- Chunk_Hdr'External_Tag holds the Chunk ID
  record
    Size:    Unsigned_32;
  end record;

Then I have several other chunks, derived from it, for example:

type Format_Chunk is new Chunk_Hdr with
  record
    Sample_Rate:  Unsigned_32;
    etc.
  end record;
for Format_Chunk'External_Tag use "fmt ";

type Data_Chunk is new Chunk_Hdr with
  record
    ...
  end record;
for Data_Chunk'External_Tag use "data";

Since WAVE chunks do not necessarily strictly obey a sequence, 
I need to be able to do:

  declare
    Chunk:   Chunk_Hdr'Class = Chunk_Hdr'Class'Input(Stream);
  begin
    -- do stuff with Chunk

The S'Class'Input() procedure first reads the tag in from
the stream, and then automatically dispatches to the 
_correct_ Read routine to bring in the rest of the contents.
The appropriate tagged record is returned and assigned to
Chunk.

This works elegantly as designed, if you are reading back
data created by S'Classs'Output() in Ada. 

So the problem is that now I want to bend the Ada defaults
so that the Chunk ID is interpreted as an external Tag for
the class of tagged records I expect to encounter. I can
set the external representation of the tags to match the
Microsoft chunk ID's. 

The real problem is that I have to bend the
tag reading procedure such that it does not read in a lower
and upper bound for the string describing the tag. The chunk
ID is always 4 bytes, and obviously does not have the Ada
bounds (dope) information ahead of it in the file.

Because a String is an array type, String'Input() which is
indirectly called by Chunk_Hdr'Class'Input(), will need
to read in array information first. Once the string bounds
are known, then the string array is created, and String'Read()
is then called to read in the contents of the Tag.

I cannot override the String'Input() routine, since I can
only do that for a type derived from String (which is of
no help here).

The only alternative that seems to be present is to
override the Chunk_Hdr'Class'Input attribute, and provide
my own routine. But this will mean that everytime I add a
new derived class (from Chunk_Hdr), that I'll have to go
back and revisit and revise this Input procedure. I was
hoping to achieve something more elegant.

> Probably what you should be doing is calling the stream's
> Ada.Streams.Read routine directly from your own custom procedure (*not*
> from an attribute).

The S'Input() procedure reads the extra dope information about
the sizes of arrays (like String), discriminants etc., BEFORE
calling the 'Read procedure. You cannot read in a String
until it is determined how large it is. Ada reads in a lower 
and upper bound in the 'Input routine, prior to calling the 
'Read routine. I am currently getting a STORAGE_ERROR because
it reads in some data for the bounds (which are 2 4 byte
integer values, which happens to be the ASCII for the
String contents). Once the bad bounds information has been
read by the Ada String'Input() routine, it then attempts to 
allocate a string of that size, to be followed by a String'Read
into the array.

> Otherwise you'll have to permanentaly specify (in
> some cases, changing) how every type you use is read and written to and
> from all streams.

This is obviously what I am trying to avoid :-)

> Streams are really best for:
>   o  hetrogenious data

Yep.

>   o  unstructured data (no record boundries)

Yep.

>   o  data written *and* read from Ada

Eventually.. right now just reading Wave files.

>   o  writer and reader programs use same stream source files

Nope, if I understand this correctly.

>   o  data written and read from code using the same compiler

The format is dictated by Mickeysoft.. and is fixed.

>   o  data written and read from code using the same platform

Platform issues have been solved. I already have a Au_Streams
package for reading *.au sound files (*.au files have a simple
header, followed by sample data).

My Au_Streams package derives from the Audio_Streams package,
which is derived from the Endian_Streams package, derived from
the Root_Streams_Type.  The Endian_Streams package and its
types allow me to remove the endian differences in most CPU
architectures without the application even knowing about it.

All that is required is a little Endian configuration when the
stream is initially opened. This greatly simplifies the rest
of the application.

Wave files however, are more complex, due to the number of
different records and the flexibility of their placement.

> The less of these bullets you can check off, the more trouble you are
> going to have. If you can't check off at least two, you are in big trouble.

Working with Microsoft Wave files is trouble enough. I already
did one implementation of the partial app the hard way. This time
around I am trying to use a stream derived from Audio_Streams as
input to the CODEC, and another stream derived from Audio_Streams
as the output for the CODEC. I have this concept working for *.au
files and a DSP_Streams stream for writing samples to /dev/dsp.

Addressing Wave files in this fashion however, is rather messy. I
simply am looking at ways to eliminate much extra code, hence
human error ;-)

I hope above additional description helps.

-- 
Warren W. Gay VE3WWG
http://members.home.net/ve3wwg



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: In Plain Text: Tags.Internal_Tag(String'Input(Stream)) ??
  2000-12-28 15:02 ` In Plain Text: " Warren W. Gay VE3WWG
  2000-12-28 15:54   ` Ted Dennison
@ 2000-12-29  3:04   ` tmoran
  2000-12-29  5:29     ` Ada0x Enhancement? Was: " Warren W. Gay VE3WWG
  1 sibling, 1 reply; 15+ messages in thread
From: tmoran @ 2000-12-29  3:04 UTC (permalink / raw)


>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.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: In Plain Text: Tags.Internal_Tag(String'Input(Stream)) ??
  2000-12-29  2:20         ` Warren W. Gay VE3WWG
@ 2000-12-29  3:20           ` tmoran
  0 siblings, 0 replies; 15+ messages in thread
From: tmoran @ 2000-12-29  3:20 UTC (permalink / raw)


>tag reading procedure such that it does not read in a lower
>and upper bound for the string describing the tag. The chunk
>ID is always 4 bytes, and obviously does not have the Ada
>bounds (dope) information ahead of it in the file.

  TILT!  Root'Class'Input *first* reads the tag, then it calls
Some_Child'Input which reads the bounds and then calls Data'Read
to read the data.  The bounds information is *after* the
chunk ID/tag.

 If "For A'External_Tag use "RIFF";" statements will handle the
Chunk ID <-> Tag stuff, and the 'Read handles the basic data,
it sounds like you need merely override S'Input to do your special
stuff for bounds.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Ada0x Enhancement? Was: Tags.Internal_Tag(String'Input(Stream)) ??
  2000-12-29  3:04   ` tmoran
@ 2000-12-29  5:29     ` Warren W. Gay VE3WWG
  2000-12-29  7:11       ` tmoran
  2000-12-30  5:55       ` External_Tag: Why? was " tmoran
  0 siblings, 2 replies; 15+ messages in thread
From: Warren W. Gay VE3WWG @ 2000-12-29  5:29 UTC (permalink / raw)


tmoran@acm.org wrote:
> 
> >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.

Yes... that is how I have been coding it. I was however, hoping
for a more automated way (without having to test for each possibility).
After all, Ada knows about all the classes and dispatches as
necessary with it's builtin tables 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.

This was the idea, but it won't work for the reasons outlined earlier
(tag input).

If you try it, you'll soon discover that Ada insists on calling
upon String'Input() to read in the tag (which is the problem
here). String'Input() insists on reading dope info that describes
how long the tag string is (the array bounds actually). My external
tags only have 4 bytes period, with no dope information provided
in the file. Hence Ada ends up trying to read dope information,
and getting tag information instead (with bad array bounds I
might add ;-)

> 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.

Yes, I have resigned to doing this, and have started coding it this
way this evening. As it turns out, some of the wave chunks
("fmt " for example) have special needs depending upon the format
of the sample data etc. The physical location of discrimants in
the file, and varying array sizes only make this problem worse.

Additionally, Microsoft's stupid Wave format often provides odd
length chunks, but they are padded to 16-bit boundaries (for the
start of the next chunk). At other times, different wave software
creates the file with odd length (to save a byte), and yet
still other software creates a even length file with the pad byte.
Additionally you have other nasties like zero terminated strings
in the chunk etc. (gag)

In short, all kinds of nasties in this format, seem to suggest that
I'll better off to control things with my very own
Chunk_Hdr'Class'Input() procedure.

>   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.

Yes, this works for types that _you_ derive, but you cannot override
the way String'Input() works for example. Hence you're back to the
initial problem of how do you modify tag reading behavior? (while
avoiding writing your own X'Class'Input procedure).

>   As has been pointed out, "For elementary types, the representation
> in terms of stream elements is implementation defined."  You may
> be unpleasantly surprised.

This has largely been deal with my lower level package Endian_Streams, 
from which the Wave_Streams package is derived. One of the goals of this
project is to create a Wave Player/Recorder that works for Big Endian
machines under Linux/FreeBSD as well as the Intel platform.

> 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.

Well folks, thanks for your efforts. It looks like the Wave file
format is sufficiently messy that I am going to go with the
Chunk_Hdr'Class'Input override route. However, it would be educational
if someone did resolve this issue, for my future reference.

It seems to me that (flame suit on) that Ada0x might consider a
means to subsitute for the Tag input/output procedure. Perhaps
something like:


for Chunk_Hdr'Class'Tag_Input use My_Chunk_Hdr_Class_Tag_Input;


This would then give the programmer a way to change the Tag_Input 
and Tag_Output, without having to resort to roll your
own X'Class'Input procedure.  Currently String'Input is always
used to initiate the read of a tag.  This leaves the programmer
out of the loop :<

-- 
Warren W. Gay VE3WWG
http://members.home.net/ve3wwg



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Ada0x Enhancement? Was: Tags.Internal_Tag(String'Input(Stream)) ??
  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
  1 sibling, 1 reply; 15+ messages in thread
From: tmoran @ 2000-12-29  7:11 UTC (permalink / raw)


>upon String'Input() to read in the tag (which is the problem
>here). String'Input() insists on reading dope info that describes
>how long the tag string is (the array bounds actually).
  Ah, now I understand why you said the dope vector came before the
tag.  You were refering to the dope vector of the external tag itself.

>Additionally, Microsoft's stupid Wave format often provides ...
MS's bmp file format has some of the same delightful characteristics.
Claw.Bitmaps.Root_DIBitmap_Type'Class'Input reads the bmp header,
then does a series of
  elsif (header says it's a VGA type 256 color bitmap)
    declare
      Result : Claw.Bitmaps.VGA_DIBitmap_Type(Height=> ...
It's tedious and unpleasant to code, but the end result is worthwhile.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Ada0x Enhancement? Was: Tags.Internal_Tag(String'Input(Stream)) ??
  2000-12-29  7:11       ` tmoran
@ 2000-12-29 14:32         ` Warren W. Gay VE3WWG
  0 siblings, 0 replies; 15+ messages in thread
From: Warren W. Gay VE3WWG @ 2000-12-29 14:32 UTC (permalink / raw)


tmoran@acm.org wrote:
> 
> >upon String'Input() to read in the tag (which is the problem
> >here). String'Input() insists on reading dope info that describes
> >how long the tag string is (the array bounds actually).
>   Ah, now I understand why you said the dope vector came before the
> tag.  You were refering to the dope vector of the external tag itself.
> 
> >Additionally, Microsoft's stupid Wave format often provides ...
> MS's bmp file format has some of the same delightful characteristics.
> Claw.Bitmaps.Root_DIBitmap_Type'Class'Input reads the bmp header,
> then does a series of
>   elsif (header says it's a VGA type 256 color bitmap)
>     declare
>       Result : Claw.Bitmaps.VGA_DIBitmap_Type(Height=> ...
> It's tedious and unpleasant to code, but the end result is worthwhile.

It also turns out that there are some advantages to doing it this
way. There is a whole group of chunks that can be contained within
one tagged record type ( LIST(INFO) member chunks for example ). Doing 
it the other way, I'd have to define 23 different tagged records with
matching tags, but with the exact same structure.

-- 
Warren W. Gay VE3WWG
http://members.home.net/ve3wwg



^ permalink raw reply	[flat|nested] 15+ messages in thread

* External_Tag: Why? was Re: Ada0x Enhancement? Was: Tags.Internal_Tag(String'Input(Stream)) ??
  2000-12-29  5:29     ` Ada0x Enhancement? Was: " Warren W. Gay VE3WWG
  2000-12-29  7:11       ` tmoran
@ 2000-12-30  5:55       ` tmoran
  2000-12-31 22:17         ` Randy Brukardt
  1 sibling, 1 reply; 15+ messages in thread
From: tmoran @ 2000-12-30  5:55 UTC (permalink / raw)


Of what use is "for T'External_Tag use "abc;" since it doesn't actually
specify what's written or read with S'Class'Input?



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: External_Tag: Why? was Re: Ada0x Enhancement? Was: Tags.Internal_Tag(String'Input(Stream)) ??
  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
  0 siblings, 1 reply; 15+ messages in thread
From: Randy Brukardt @ 2000-12-31 22:17 UTC (permalink / raw)


tmoran@acm.org wrote in message ...
>Of what use is "for T'External_Tag use "abc;" since it doesn't actually
>specify what's written or read with S'Class'Input?

I think that the intent was that it can be used to synchronize tags
between multiple programs compiled with a single compiler. (There is no
guarentee that they are the same otherwise...)

            Randy.







^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: External_Tag: Why? was Re: Ada0x Enhancement? Was: Tags.Internal_Tag(String'Input(Stream)) ??
  2000-12-31 22:17         ` Randy Brukardt
@ 2001-01-01 16:50           ` Warren W. Gay VE3WWG
  0 siblings, 0 replies; 15+ messages in thread
From: Warren W. Gay VE3WWG @ 2001-01-01 16:50 UTC (permalink / raw)


Randy Brukardt wrote:
> 
> tmoran@acm.org wrote in message ...
> >Of what use is "for T'External_Tag use "abc;" since it doesn't actually
> >specify what's written or read with S'Class'Input?
> 
> I think that the intent was that it can be used to synchronize tags
> between multiple programs compiled with a single compiler. (There is no
> guarentee that they are the same otherwise...)
> 
>             Randy.

You can override the way any type is T'Input or T'Read, but you cannot
override the way tags are read. Tags are always read with String'Input.
Hence the suggested improvement. Look into the way tagged records are
read from a Stream, and you'll understand the enhancement request.

-- 
Warren W. Gay VE3WWG
http://members.home.net/ve3wwg



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2001-01-01 16:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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
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

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