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,4d6ffb27cf9c5e6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-17 09:35:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: How to read in very long strings. (was: HELP!!!!!!) Date: Wed, 17 Oct 2001 12:28:53 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9qkbk7$mak$1@nh.pace.co.uk> References: <9qk4lr$1tvj$1@newsreader1.mclink.it> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1003336135 22868 136.170.200.133 (17 Oct 2001 16:28:55 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 17 Oct 2001 16:28:55 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:14827 Date: 2001-10-17T16:28:55+00:00 List-Id: You really shouldn't use a subject line of HELP!!!! since it is too vague to get the proper attention. The AdaPower web site has an example of this. Go to http://www.adapower.com/index2.html and click on "Source Code". Follow that to "Language and Technique Examples". Look for "Reading Long Strings Using Recursion (Carlisle)" and you will find an answer. You will along the way find lots of other useful stuff. Just because I'm a Really Wonderful Guy, I'll cut-n-paste the code here for you, but you'll still want to go to AdaPower since you will undoubtedly find lots of additional help for problems yet to arise... function Next_Line(File : in Ada.Text_IO.File_Type := Ada.Text_Io.Standard_Input) return String is Answer : String(1..256); Last : Natural; begin Ada.Text_IO.Get_Line(File => File, Item => Answer, Last => Last); if Last = Answer'Last then return Answer & Next_Line(File); else return Answer(1..Last); end if; end Next_Line; 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/ "F" wrote in message news:9qk4lr$1tvj$1@newsreader1.mclink.it... > 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) > Thank you!!!!!!!!!! > Just a consideration, string's manage in Ada is not so beutifull: i can > implement a server without problems but i cannot take a string in > input........... > Bye Phosphorus > >