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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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 06:11:42 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!wanadoo.fr!not-for-mail From: Pascal Obry Newsgroups: comp.lang.ada Subject: Re: Imitation is the sincerest form of flattery Date: 22 Mar 2003 15:11:20 +0100 Organization: Home - http://perso.wanadoo.fr/pascal.obry Message-ID: References: <1047665830.579605@master.nyc.kbcfp.com> <7eee7v4hpvj0i5s345uonlen5315rhiau8@4ax.com> <4dkea.75440$gi1.38045@nwrdny02.gnilink.net> NNTP-Posting-Host: avelizy-103-1-1-92.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news-reader10.wanadoo.fr 1048342301 29866 217.128.141.92 (22 Mar 2003 14:11:41 GMT) X-Complaints-To: abuse@wanadoo.fr NNTP-Posting-Date: 22 Mar 2003 14:11:41 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.95 Xref: archiver1.google.com comp.lang.ada:35621 Date: 2003-03-22T14:11:41+00:00 List-Id: "Dmitry A. Kazakov" writes: > > 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. You mean that the compiler must generate a call to Set_Element/Get_Element for every reference to an array item, right ? So what you are looking for is a type with runtime support, a bit like Ada.Finalization API with the Initialize/Adjust/Finalize routines, right ? Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://perso.wanadoo.fr/pascal.obry --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595