comp.lang.ada
 help / color / mirror / Atom feed
From: Mario Amado Alves <maa@di.fct.unl.pt>
To: "comp.lang.ada@list.deja.com" <comp.lang.ada@list.deja.com>
Subject: Re: Generic package array parameter
Date: 1999/11/23
Date: 1999-11-23T00:00:00+00:00	[thread overview]
Message-ID: <Pine.LNX.4.10.9911231052200.6738-100000@lexis.di.fct.unl.pt> (raw)
In-Reply-To: wccaeoi2f05.fsf@world.std.com

Looking back, I was really looking for a way to make an instatiation with
an array (of type named or not) *know* about its types (of the indexes
and/or of the cells) in a compact way, e.g. (pseudocode):

generic
  Table: array(<>, <>) of <>;
package Foo
  type Index1 is Table'Index'Type(1);
  type Index2 is Table'Index'Type(2);
  type Cell_Type is Table(Index1'First, Index2'First)'Type;
  function Example(I: Index1; J: Index2) return Cell_Type;
end;

But now I've agreed to trade compactness for safety and eficiency; the
thing has now compiled and it's working. Duff, thanks a lot. (Heaney,
perhaps sometime I take the trouble to comment back and show the world I am
not that stupid.;-)

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




 Sent via Deja.com http://www.deja.com/
 Before you buy.




  reply	other threads:[~1999-11-23  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-04  0:00 HELP - MAC compilation of an Ada program William A Whitaker
1999-11-05  0:00 ` Robert Dewar
1999-11-05  0:00 ` James E. Hopper
1999-11-12  0:00 ` Generic package array parameter Mario Amado Alves
1999-11-12  0:00   ` Tucker Taft
1999-11-12  0:00   ` Matthew Heaney
1999-11-13  0:00     ` Robert A Duff
1999-11-23  0:00       ` Mario Amado Alves [this message]
1999-11-23  0:00         ` Matthew Heaney
replies disabled

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