Question about anonymous arrays as record components 
Author Message
 Question about anonymous arrays as record components

Hello everybody!

After having a whole night of reading e-mails replying to my question about
anonymous arrays (thanks everybody ;-), I've come to the following
conlusions:

  1.  Due to lack of RTFHM I was confusing anonymous types
      with unconstrained array types, and I was confusing
      unconstrained array types with constrained array types
      that don't use literals for the range specification.

  2.  There are lots of other people messing up anonymous
      arrays with lots of other Ada constructs.
      (Made me feel better!)

  3.  A few people explained awfully well and in painly detail that
      anonymous types are just that: types without a name.
      And since Ada uses strict type-checking, anonymous types are
      incompatible anything else (even two array (1..2) of Boolean
      are incompatible with each  other, for example), so they are
      not usefull at all, so they shouldn't be used, so they're
      illegal in many cases.

The reasons I 'wanted' to do thing the hard way, was my previous experience
with other programming languages, like Pascal and Modula-2 (I already managed
to forget all about C/C++). In these languages it wasn't possible to create
unconstrained array types, so you could (in Borland Pascal) create String_12
for String[12] and String_20 for String[20] etc, or use anonymous types.

Groetjes, Geert



Sat, 18 Oct 1997 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Question about anonymous arrays as record components

2. anonymous arrays not allowed as components

3. An array of records within an array of records (Still a problem)

4. an array of records within an array of records

5. DEALLOCATE of a derived type array containing pointer array components

6. array components containing arrays

7. Array of Variant Records Question...

8. Anonymous array clarification.

9. Anonymous array clarification.(Better idea, I think.)

10. Question about array ops on arrays of types of arrays of ...(ack)

11. ABC - Prime Record in multi component key ( C5002 )

12. Memory representation of variable length record components

 

 
Powered by phpBB® Forum Software