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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4d6ffb27cf9c5e6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-18 00:30:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!news-hog.berkeley.edu!ucberkeley!xmission!nntp.infostrada.it!i2unix!newsfeed.mclink.it!not-for-mail From: "F" Newsgroups: comp.lang.ada Subject: Re: HELP!!!!!! Date: Thu, 18 Oct 2001 09:10:55 +0200 Organization: MC-link S.p.A. Message-ID: <9qlv2v$25md$1@newsreader1.mclink.it> References: <9qk4lr$1tvj$1@newsreader1.mclink.it> <3bcdaa4e.11615702@news.geccs.gecm.com> NNTP-Posting-Host: net154-133.mclink.it X-Trace: newsreader1.mclink.it 1003388831 71373 195.110.154.133 (18 Oct 2001 07:07:11 GMT) X-Complaints-To: usenet@newsreader1.mclink.it NNTP-Posting-Date: Thu, 18 Oct 2001 07:07:11 +0000 (UTC) X-Newsreader: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Xref: archiver1.google.com comp.lang.ada:14858 Date: 2001-10-18T09:10:55+02:00 List-Id: My problem is the second time i recall the function read string, in fact the value of the function end_of_line remains true after the first time in wich the user press return..... II'm trying to use the procedure get_line instead of get, i'll give you news about this "experiment" Thank you for your help Phosphorus Chris M. Moore ha scritto nel messaggio <3bcdaa4e.11615702@news.geccs.gecm.com>... >On Wed, 17 Oct 2001 16:34:03 +0200, "F" wrote: > >>I would like to make a program in wich a string is given in input and the >>dimension of it is unknown (till someone insert it...) >>HOW CAN I DO?????? (without using hundreds of lines) > >function Read_String_From_Keyboard return String is > Temp_Str : Ada.Strings.Unbounded.Unbounded_String := > Ada.Strings.Unbounded.Null_Unbounded_String; > Ch : Character; >begin > while not Ada.Text_IO.End_Of_Line loop > Ada.Text_IO.Get(Ch); > Temp_Str := Ada.Strings.Unbounded."&"(Temp_Str, Ch); > end loop; > return Ada.Strings.Unbounded.To_String(Temp_Str); >end Read_String_From_Keyboard; > >seems like the safest way. I haven't tried compiling this though so >who knows! > >-- >Chris M. Moore >Software engineer >speaking for myself