comp.lang.ada
 help / color / mirror / Atom feed
* array(enumeration)
@ 2000-07-19  0:00 Mario Amado Alves
  2000-07-20  0:00 ` array(enumeration) Frode Tenneboe
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mario Amado Alves @ 2000-07-19  0:00 UTC (permalink / raw)
  To: comp.lang.ada

How do I define an array type indexed by an enumeration type?

  type Array_Type is array(<>) of Some_Type;
    --                    /|\
    --                     |
    -- compiler says identifier expected here

  type Enumeration_Type is (A, B, C);
  type Another_Enumeration_Type is (X, Y, Z);

  A_Thing: Array_Type(Enumeration_Type) := (
    A => ... ,
    B => ... ,
    C => ... );

  Another_Thing: Array_Type(Another_Emuneration_Type) := (
    X => ... ,
    Y => ... ,
    Z => ... );

This makes sense to me, but does not compile. So how do I code the idea?

Thanks.

| |,| | | |RuaFranciscoTaborda24RcD 2815-249CharnecaCaparica 351+939354002
|M|A|R|I|O|
|A|M|A|D|O|DepartmentoDeInformaticaFCT/UNL 2825-114 Caparica 351+212958536
|A|L|V|E|S|                                                  fax 212948541
| | | | | |                 maa@di.fct.unl.pt                FCT 212948300









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

end of thread, other threads:[~2000-07-20  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-19  0:00 array(enumeration) Mario Amado Alves
2000-07-20  0:00 ` array(enumeration) Frode Tenneboe
2000-07-20  0:00 ` array(enumeration) Philip Anderson
2000-07-20  0:00 ` array(enumeration) Steve Folly

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