comp.lang.ada
 help / color / mirror / Atom feed
From: "Defiant" <ithinkiforgot@.bad.memory.com>
Subject: Re: Problems with Last statment ....
Date: 2000/03/14
Date: 2000-03-14T00:00:00+00:00	[thread overview]
Message-ID: <38cef80c.0@news.per.paradox.net.au> (raw)
In-Reply-To: 38CE7AD7.7A111DC0@res.raytheon.com

THANKS HEAPS !! works like a charm... ill have to remeber this think ill be
using the last statement a bit, thanks!


"John J Cupak Jr" <John_J_Cupak@res.raytheon.com> wrote in message
news:38CE7AD7.7A111DC0@res.raytheon.com...
> I hear about this problem quite a bit from my Ada students.
>
> Reading/Writing fixed-length strings:
>
> Get_Line(Name, Last); -- Reads 0..Last number of characters into Name
string
> Put         (Name(1..Last)); -- Put ONLY characters just read to output!
>
> Hope this helps!
>
> Yours in Ada,
> John
>
> Defiant wrote:
>
> > hi im writing a program for a uni assignment and it is complete and
works
> > yet i have set the string type to a min of 1 to a max of 20 characters
for a
> > name input...
> >
> > the problem i am having is i am using the Get_Line(Name, Last) statement
to
> > get the name they feed in and the Put(Name); procedure to output... the
> > problem is ada compiler grabs whatever extra numerals hex and garbage
that
> > is left in RAM to fill the extra places between 1 and 20... that the
name
> > that was input doesnt fill ....
> >
> > any suggestions ...
> >
> > Thanks
>






      reply	other threads:[~2000-03-14  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-14  0:00 Problems with Last statment Defiant
2000-03-14  0:00 ` Frank J. Lhota
2000-03-14  0:00 ` John English
2000-03-14  0:00 ` John J Cupak Jr
2000-03-14  0:00   ` Defiant [this message]
replies disabled

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