comp.lang.ada
 help / color / mirror / Atom feed
From: danifreecs@gmail.com
Subject: Re: Need some help in Ada
Date: Wed, 23 Mar 2016 14:11:53 -0700 (PDT)
Date: 2016-03-23T14:11:53-07:00	[thread overview]
Message-ID: <178c3841-3551-4403-a488-4c1f9e876132@googlegroups.com> (raw)
In-Reply-To: <f9050a08-1271-441f-a579-eabf218c7938@googlegroups.com>

2016. március 23., szerda 21:52:02 UTC+1 időpontban Anh Vo a következőt írta:
> On Wednesday, March 23, 2016 at 1:24:05 PM UTC-7, danif...@gmail.com wrote:
> > 2016. március 23., szerda 20:51:40 UTC+1 időpontban Anh Vo a következőt írta:
> > > On Wednesday, March 23, 2016 at 12:29:05 PM UTC-7, danif...@gmail.com wrote:
> > 
> > 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	
> > 		if (Str'Length = 0) then
> > 			Jstr.Components := "";
> > 		else
> > 			Jstr.Components := Str;
> > 		end if;
> > 	return Jstr;
> > 	end Create;
> > when i try to use it like: jstr1: J_String(4) := Create("doge");
> > i get this error "expected private type ada.text_io.file_type" which i can't really understand.
> 
> There is not enough information to tell. I suggest to post more of your codes.

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 wrote before was in a test project which i created only to examine the above problems 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! Have a nice evening mate! :)

  reply	other threads:[~2016-03-23 21:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23 19:29 Need some help in Ada danifreecs
2016-03-23 19:51 ` Anh Vo
2016-03-23 20:24   ` danifreecs
2016-03-23 20:52     ` Anh Vo
2016-03-23 21:11       ` danifreecs [this message]
2016-03-23 21:34         ` Anh Vo
2016-03-23 21:06     ` Robert A Duff
2016-03-23 21:10     ` Niklas Holsti
2016-03-23 21:18 ` danifreecs
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox