From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,604e0f87aa06eab6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-22 01:03:16 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!dialin-145-254-037-059.arcor-ip.NET!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Imitation is the sincerest form of flattery Date: Sat, 22 Mar 2003 10:05:05 +0100 Organization: At home Message-ID: References: <1047665830.579605@master.nyc.kbcfp.com> <7eee7v4hpvj0i5s345uonlen5315rhiau8@4ax.com> <4dkea.75440$gi1.38045@nwrdny02.gnilink.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-037-059.arcor-ip.net (145.254.37.59) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1048323794 77808334 145.254.37.59 (16 [77047]) User-Agent: KNode/0.7.1 Xref: archiver1.google.com comp.lang.ada:35616 Date: 2003-03-22T10:05:05+01:00 List-Id: Pascal Obry wrote: > Dmitry A. Kazakov writes: > >> A private implementation of an array type. If the language have had >> full ADT there would be no need predefined Unbounded_String. Or >> consider the following: >> >> type Sparse_Matrix is >> private array (Integer range <>; Integer <>) of Element; >> >> It has an array interface, but internally it is also a record type >> using a list to keep the array elements. > > But how do you access element into this array, what would be done > for: > > M : Sparse_Matix (1 .. 7, 1 .. 90); > > M (2, 6) := ...; I have to prove an implementation for Set_Element, I suppose. When I declare that Sparse_Matrix an array, I have to override all the abstract methods of the universal array type might have. Set_Element is one of them. -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de