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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d655a6c8557d8a35 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-14 19:54:32 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!uknet!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Storing A string Date: Thu, 14 Feb 2002 13:07:19 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1013710041 21980 136.170.200.133 (14 Feb 2002 18:07:21 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 14 Feb 2002 18:07:21 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:20032 Date: 2002-02-14T18:07:21+00:00 List-Id: There must be 50 ways to do what you're describing. The important thing to remember is that Get_Line works like assignment - it replaces the content of the string with the new content when you read. Take note of the fact that Get_Line has a parameter called "Last" that indicates the last character read for the line. Also note that you can reference a slice of a string as in: Some_String (Start_Pos..End_Pos), so you could utilize Get_Line, Last and slices to read several times into the same string object at different positions. But that doesn't seem like it would entirely do what you want, because as you may not have noticed, a String is not dynamic - it has a fixed size that you will eventually exhaust if you keep concatenating to it in a loop. What may be more useful is to investigate Unbounded_String. (See: ARM Appendix A.4.5) You can take a String and concatenate to the end of an Unbounded_String (as well as many other operations) and then the string can keep growing until you exhaust available memory. You'll find it really helpful when dealing with strings to look over the predefined string handling packages that Ada provides. Check out the appendices of the ARM or a good Ada book to find all the help Ada gives you with this. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Anthony Wise" wrote in message news:mailman.1013706303.15083.comp.lang.ada@ada.eu.org... > Hi > another newbie question ! > > I need my program to be able to accept lines of text. These lines can be as > long or short as the user likes. > I am using the Get_Line procedure (Using only one string), however this > allows only one entery. So i put Get_Line in a loop, but now the only > accessable input is the last input. Is there anyway i can store all the > inputs so i can process them and then output them all together. > all advice welcomed thx. > > _________________________________________________________________ > MSN Photos is the easiest way to share and print your photos: > http://photos.msn.com/support/worldwide.aspx >