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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3fd398f82685fcd5 X-Google-Attributes: gid103376,public From: "Frank C. Post" Subject: Re: Text_io, beginer's question Date: 1996/10/29 Message-ID: <01bbc5d9$7f33d8e0$6a9148a6@cornerstone.mydomain.org>#1/1 X-Deja-AN: 193086356 references: <32671BAF.D25@mail.wdn.com> content-type: text/plain; charset=ISO-8859-1 mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-10-29T00:00:00+00:00 List-Id: 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 >