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.182.226.162 with SMTP id rt2mr3282901obc.24.1458768850626; Wed, 23 Mar 2016 14:34:10 -0700 (PDT) X-Received: by 10.182.40.227 with SMTP id a3mr60412obl.14.1458768850465; Wed, 23 Mar 2016 14:34:10 -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!av4no1754885igc.0!news-out.google.com!h70ni818qge.0!nntp.google.com!nt3no3945392igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 23 Mar 2016 14:34:10 -0700 (PDT) In-Reply-To: <178c3841-3551-4403-a488-4c1f9e876132@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=149.32.224.36; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 149.32.224.36 References: <2b215924-fdb7-4f58-b496-018ab837feec@googlegroups.com> <178c3841-3551-4403-a488-4c1f9e876132@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <0b2ba059-82a8-4ebf-8026-7035dbb0b5d9@googlegroups.com> Subject: Re: Need some help in Ada From: Anh Vo Injection-Date: Wed, 23 Mar 2016 21:34:10 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:29870 Date: 2016-03-23T14:34:10-07:00 List-Id: On Wednesday, March 23, 2016 at 2:11:55 PM UTC-7, danif...@gmail.com wrote: > 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 wr= ote: > > > 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.c= om 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= codes. >=20 > It works in my project now which i'm writing since 2 days, i implemented = all the methods my teacher wanted except that Is_Empty(), because first my = Size was Positive not a Natural so i couldn't create empty strings, then i = didn't know that my discriminant was bad, but now it works. The Error i wro= te before was in a test project which i created only to examine the above p= roblems separately, but in my main project it works fine at last. If you're= curious i can copy the codes, but everything's okay now, thanks to you! Ha= ve a nice evening mate! :) I am glad it worked out for you. Thus, you do not need to post any.