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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,c0581b94f07c034a X-Google-Attributes: gid103376,public From: "Jean-Pierre Rosen" Subject: Re: Constraint Error - Please Help Date: 1998/12/03 Message-ID: <7461v4$272$1@platane.wanadoo.fr>#1/1 X-Deja-AN: 418219730 Content-Transfer-Encoding: 8bit References: <7445iv$gog$1@news.nyu.edu> Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 Organization: Adalog Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-12-03T00:00:00+00:00 List-Id: Not the initial question, but I can't resist: Fanni Kolchina a �crit dans le message <7445iv$gog$1@news.nyu.edu>... > [...] > function sort_generic (x: SORT_ARRAY) return SORT_ARRAY is > copy: SORT_ARRAY(x'range); > last, left, right, max_l_r, current, this, parent: integer; > end_node, contents : ITEM; > begin > > for i in x'first..x'last loop > copy(i):=x(i); > end loop; > You should rather simply write: function sort_generic (x: SORT_ARRAY) return SORT_ARRAY is copy: SORT_ARRAY := x; One of the nice things with Ada is that you can very often deal with structrured variables globally, and that you are not forced to always go to basic loop. --------------------------------------------------------- J-P. Rosen (Rosen.Adalog@wanadoo.fr) Visit Adalog's web site at http://perso.wanadoo.fr/adalog