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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,87a926dbf0cf8cb1 X-Google-Attributes: gid103376,public From: Mats Weber Subject: Re: newbie problem Date: 1998/12/04 Message-ID: <36681A30.5A315F94@elca-matrix.ch>#1/1 X-Deja-AN: 418670492 Content-Transfer-Encoding: 7bit References: <3667EE11.6E94BA0F@interact.net.au> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: ELCA Matrix SA Mime-Version: 1.0 Reply-To: Mats.Weber@elca-matrix.ch Newsgroups: comp.lang.ada Date: 1998-12-04T00:00:00+00:00 List-Id: Graeme Wallace wrote: > > If I want to get user input for my program in the form of a string of > undefined length, how do I do so ? If I set the string length to, say: > > help_me_please : String(1..20); > > I seem to be stuck with a string exactly that size. What is the > variable assignment which allows the actual length of the user input to > determine the length of the string which the io system > (ada.text_io.)gets ? Download GNAT and look at the package GNAT.IO_Aux. It contains two Get_Line functions that should solve your problem: help_me_please : constant String(1..20) := GNAT.IO_Aux.Get_Line;