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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.98.89.143 with SMTP id k15mr3125320pfj.14.1458767514296; Wed, 23 Mar 2016 14:11:54 -0700 (PDT) X-Received: by 10.182.112.202 with SMTP id is10mr59458obb.7.1458767514229; Wed, 23 Mar 2016 14:11:54 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.mixmin.net!news.glorb.com!y89no9085519qge.0!news-out.google.com!b22ni1554qge.1!nntp.google.com!y89no9085515qge.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 23 Mar 2016 14:11:53 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.238.64.35; posting-account=WGwmlQoAAADDeUXb_cIKMah4KZlJkq5i NNTP-Posting-Host: 85.238.64.35 References: <2b215924-fdb7-4f58-b496-018ab837feec@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <178c3841-3551-4403-a488-4c1f9e876132@googlegroups.com> Subject: Re: Need some help in Ada From: danifreecs@gmail.com Injection-Date: Wed, 23 Mar 2016 21:11:54 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:29868 Date: 2016-03-23T14:11:53-07:00 List-Id: 2016. m=C3=A1rcius 23., szerda 21:52:02 UTC+1 id=C5=91pontban Anh Vo a k=C3= =B6vetkez=C5=91t =C3=ADrta: > On Wednesday, March 23, 2016 at 1:24:05 PM UTC-7, danif...@gmail.com wrot= e: > > 2016. m=C3=A1rcius 23., szerda 20:51:40 UTC+1 id=C5=91pontban Anh Vo a = k=C3=B6vetkez=C5=91t =C3=ADrta: > > > On Wednesday, March 23, 2016 at 12:29:05 PM UTC-7, danif...@gmail.com= wrote: > >=20 > > Thank you for the reply! So it should be Components: String(1..Size)? > > then i wrote this: > > function Create(Str : String) return J_String is > > Jstr: J_String(Str'Length); > > begin=09 > > if (Str'Length =3D 0) then > > Jstr.Components :=3D ""; > > else > > Jstr.Components :=3D Str; > > end if; > > return Jstr; > > end Create; > > when i try to use it like: jstr1: J_String(4) :=3D Create("doge"); > > i get this error "expected private type ada.text_io.file_type" which i = can't really understand. >=20 > There is not enough information to tell. I suggest to post more of your c= odes. It works in my project now which i'm writing since 2 days, i implemented al= l the methods my teacher wanted except that Is_Empty(), because first my Si= ze was Positive not a Natural so i couldn't create empty strings, then i di= dn't know that my discriminant was bad, but now it works. The Error i wrote= before was in a test project which i created only to examine the above pro= blems separately, but in my main project it works fine at last. If you're c= urious i can copy the codes, but everything's okay now, thanks to you! Have= a nice evening mate! :)