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,ed290afd6f09a679 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!z14g2000cwz.googlegroups.com!not-for-mail From: "Adam Beneschan" Newsgroups: comp.lang.ada Subject: Re: Initialize with aggregate? Date: 22 Nov 2005 09:10:37 -0800 Organization: http://groups.google.com Message-ID: <1132679437.354982.169370@z14g2000cwz.googlegroups.com> References: <1132602018.206322.285630@g44g2000cwa.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1132679442 21305 127.0.0.1 (22 Nov 2005 17:10:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 22 Nov 2005 17:10:42 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040805 Netscape/7.2,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: z14g2000cwz.googlegroups.com; posting-host=66.126.103.122; posting-account=cw1zeQwAAABOY2vF_g6V_9cdsyY_wV9w Xref: g2news1.google.com comp.lang.ada:6529 Date: 2005-11-22T09:10:37-08:00 List-Id: Simon Wright wrote: > > type node; > > type storage is access node; > > type node is > > record > > next: storage; -- Pekare till n=E4sta nod. > > item: string(1..50); -- En textstr=E4ng > > len: integer :=3D-1; -- L=E4ngden p=E5 str=E4ngen. > > count: integer :=3D 0; -- Antalet f=F6rekomster av str=E4n= gen > > end record; > > . > > . > > . > > tempstore:=3Dnew Node; > > tempstore.item(1 .. Val'length):=3DVal; > > tempstore.len:=3DVal'length; > > tempstore.count:=3D1; > > if S /=3D null then > > tempstore.next:=3DS; > > end if; > > S:=3Dtempstore; > > [/code] > > S :=3D new Node'(Next =3D> S, > Item =3D> <>, > Len =3D> Val'Length, > Count =3D> 1); You don't need a separate function. This should work: S :=3D new Node' (Next =3D> S, Item =3D> Val & ((Val'Length + 1) .. 50 =3D> ' '), Len =3D> Val'Length, Count =3D> 1); [Apologies for any spacing problems. Google Groups' latest improvement prevents me from using a fixed font when composing a post.] -- Adam