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-Thread: 103376,6ed5672f823f694 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!news.glorb.com!proxad.net!193.252.118.146.MISMATCH!news.wanadoo.fr!news.wanadoo.fr!not-for-mail From: Jean-Baptiste CAMPESATO Organization: a2lf - Association pour le Logiciel Libre Francophone Subject: Re: =?iso-8859-1?q?d=E9lcarer?= un array sans indices. Date: Sun, 20 Mar 2005 15:45:23 +0100 User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table) Message-Id: Newsgroups: comp.lang.ada References: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit NNTP-Posting-Date: 20 Mar 2005 15:44:10 CET NNTP-Posting-Host: 83.112.52.79 X-Trace: 1111329850 news.wanadoo.fr 11717 83.112.52.79:34303 X-Complaints-To: abuse@wanadoo.fr Xref: g2news1.google.com comp.lang.ada:9641 Date: 2005-03-20T15:44:10+01:00 List-Id: Le Sun, 20 Mar 2005 14:36:04 +0000, Adrian Knoth a �crit�: > Jean-Baptiste CAMPESATO wrote: > >> Par exemple, j'ai le type : >> type Matrice is array ( Integer range <>, Integer range <>) of Float; >> Je souhaite d�clarer une variable gauss, sans indices, de type Matrice et >> plus tard dans le programme, suite a une intervention de l'utilisteur >> donner les indices ad�quates. > > Sorry for not answering en fran�aise, I hope you'll still be able > to understand the response: > > procedure jean is > type Matrice is array ( Integer range <>, Integer range <>) of Float; > > procedure something (a, b, c, d : in Positive ) is > gauss : Matrice (a .. b, c .. d); > begin > null; > end something; > > a, b, c, d : Positive; > > begin > a := 1; > b := 300; > c := 1; > d := 200; > something (a, b, c, d); > end jean; > > Just ask your user about the real values of a,b,c,d. For a large > matrix it could be better to allocate heap memory: > > type Matrice_ptr is access Matrice; > gauss : Matrice_ptr := new Matrice (a .. b, c .. d); Scuse for post in French, my problem is not exactly that. My problem is : I created a type : Matrice. I want create a variable of Matrice (gauss:Matrice;) when we execute my programm But i don't know the range of my matrix. The user will give me the number of range after. How can i create a Array without range and after give to the programme the range ? thanks a lot