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!news1.google.com!newsread.com!news-xfer.newsread.com!newspeer.monmouth.com!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!news-lei1.dfn.de!news.uni-jena.de!not-for-mail From: Adrian Knoth Newsgroups: comp.lang.ada Subject: Re: =?iso-8859-1?Q?d=E9lcarer?= un array sans indices. Date: 20 Mar 2005 14:36:04 GMT Organization: loris.TV Message-ID: References: NNTP-Posting-Host: ppc201.mipool.uni-jena.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: fsuj29.rz.uni-jena.de 1111329364 26643 141.35.13.101 (20 Mar 2005 14:36:04 GMT) X-Complaints-To: news@rz.uni-jena.de NNTP-Posting-Date: 20 Mar 2005 14:36:04 GMT User-Agent: slrn/0.9.8.1 (Debian) Xref: g2news1.google.com comp.lang.ada:9640 Date: 2005-03-20T14:36:04+00:00 List-Id: 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); -- mail: adi@thur.de http://adi.thur.de PGP: v2-key via keyserver Das Fleisch war willig, doch das Gras war na�