comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <jeffrey.carter@boeing.com>
Subject: Re: HELP!!!!!!
Date: Wed, 17 Oct 2001 18:17:48 GMT
Date: 2001-10-17T18:17:48+00:00	[thread overview]
Message-ID: <3BCDCB4C.DAA860CD@boeing.com> (raw)
In-Reply-To: 3bcdaa4e.11615702@news.geccs.gecm.com

"Chris M. Moore" wrote:
> 
> On Wed, 17 Oct 2001 16:34:03 +0200, "F" <phosphorus@libero.it> 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!

This seems like more work than is needed. PragmARC.Get_Line from the
PragmAda Reusable Components does this (and from other
Ada.Text_IO.File_Type files as well) without repeatedly modifying an
unbounded string.

-- 
Jeffrey Carter



  parent reply	other threads:[~2001-10-17 18:17 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-17 14:34 HELP!!!!!! F
2001-10-17 16:10 ` HELP!!!!!! Chris M. Moore
2001-10-17 16:36   ` How to read in very long strings. (was: HELP!!!!!!) Marin David Condic
2001-10-17 18:17   ` Jeffrey Carter [this message]
2001-10-18  7:10   ` HELP!!!!!! F
2001-10-18  8:11     ` HELP!!!!!! Martin Dowie
2001-10-18 16:57       ` HELP!!!!!! Jeffrey Carter
2001-10-17 16:28 ` How to read in very long strings. (was: HELP!!!!!!) Marin David Condic
2001-10-17 22:18   ` Jeffrey Carter
2001-10-18 13:39     ` Marin David Condic
2001-10-17 17:31 ` HELP!!!!!! tmoran
  -- strict thread matches above, loose matches on Subject: below --
2003-02-24 11:44 Help! Paul Gregory
2003-02-24 13:08 ` Help! Preben Randhol
2003-02-24 13:10   ` Help! Preben Randhol
2000-08-31  0:00 HELP!! Michele De Rosa
2000-08-31 12:20 ` HELP!! Pascal Obry
2000-08-31 12:23 ` HELP!! Ken Garlington
2000-03-24  0:00 Help!! Paul Moran
2000-03-24  0:00 ` Help!! Pascal Obry
1999-11-21  0:00 Help? Matthew Lawrence
1999-11-21  0:00 ` Help? David C. Hoos, Sr.
1999-11-22  0:00 ` Help? John English
1999-11-22  0:00 ` Help? Riyaz Mansoor
1999-11-22  0:00 ` Help? Robert Dewar
1997-06-10  0:00 HELP!!!!!! Luke Holden
1997-05-24  0:00 help! oliver white
1997-04-28  0:00 Help!! UserID
1997-04-29  0:00 ` Help!! Michael F Brenner
1997-03-16  0:00 HELP! Dominic Mailhot
1997-03-17  0:00 ` HELP! Jon S Anthony
1997-03-18  0:00   ` HELP! Robert Dewar
1997-03-18  0:00   ` HELP! Jon S Anthony
1997-03-18  0:00 ` HELP! Robert Dewar
1996-11-02  0:00 HELP!!! Aaron H
1996-10-01  0:00 Help! Cheryl Earnest
1996-10-01  0:00 ` Help! John Herro
1996-10-02  0:00   ` Help! Jean-Etienne Doucet
1996-10-03  0:00     ` Help! John Herro
1996-10-03  0:00       ` Help! John Herro
1996-10-01  0:00 ` Help! Samuel Tardieu
1996-10-01  0:00   ` Help! Keith Thompson
1996-10-01  0:00   ` Help! Larry Kilgallen
1996-03-27  0:00 HELP!!! ~ AnTY ~
1990-09-23 13:52 Help! Ken McCook;SCDQ;
1990-09-25 16:23 ` Help! Michael Feldman
1990-09-26 16:27 ` Help! Andy DeFaria
1990-09-26 19:26 ` Help! Andy DeFaria
1990-08-31 20:21 HELP! "Thomas H. Stripe  255-4472", 513
1990-09-05 16:27 ` HELP! Edward Falis
1990-07-07  7:23 Help !!!! 1LENDL
1990-01-24  1:26 Help! Rowan D. Stevens
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox