From: "Frank C. Post" <postman@christcom.net>
Subject: Re: Text_io, beginer's question
Date: 1996/10/29
Date: 1996-10-29T00:00:00+00:00 [thread overview]
Message-ID: <01bbc5d9$7f33d8e0$6a9148a6@cornerstone.mydomain.org> (raw)
In-Reply-To: wwimber-2410962147430001@daniel209.labs.clemson.edu
Try this:
fname : fname_type := (others=>' ');
fname_ndx : natural := natural'first;
text_io.get_line(fname,fname_ndx);
if fname_ndx = fname'last then
text_io.skip_line;
end if;
Indiscriminant use of text_io.skip_lines commonly cause more problems than
they solve. If you want to know why, send me some email and I'll send you
a personal reply.
--postman
> > Wrote a loop to read in strings along with other types of variable from
> > keyboard. Except the first time it was encounted in the loop, the line
> > " Text_IO.Get_Line(String, StringLength)" would not be executed. Any
> > idea how to fix that? BTW, I am using win95 GNAT v.304a. Thanks in
> > advance.
>
> Stick a Text_IO.Skip_Line in the code right before the loop. This might
work.
> I have had similar problems using Get_Line and sometimes a Skip_Line will
help.
> I don't know why, but if it works it works.
>
> Hope this helps.
>
> Wiley Wimberly
>
prev parent reply other threads:[~1996-10-29 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-10-18 0:00 Text_io, beginer's question Xuren Huang
1996-10-21 0:00 ` John Herro
1996-10-24 0:00 ` Wiley C. Wimberly, Jr.
1996-10-29 0:00 ` Frank C. Post [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