comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam@spam.com>
Subject: Re: Random Input-Size and recognizing ENTER-press
Date: Sun, 19 Dec 2004 15:52:14 GMT
Date: 2004-12-19T15:52:14+00:00	[thread overview]
Message-ID: <Oshxd.4358$RH4.161@newsread1.news.pas.earthlink.net> (raw)
In-Reply-To: <cq3f0i$fau$05$1@news.t-online.com>

xadian wrote:
> 
> Here's my problem:
> I need to to Get() a random number of characters (typed by the user) in 
> an array.
> I could loop with a Get() statement and exit when all the inputs are in 
> the array, but for that I'd need to know the number of inputs before. Is 
> there a way to do that without knowing the input number?!

An array of characters is a string. In Ada, you can use the predefined 
type String.

Input of an arbitrary length String is easily done with a function such 
as PragmARC.Get_Line.

You can obtain the PragmAda Reusable Components at

http://home.earthlink.net/~jrcarter010/pragmarc.htm

-- 
Jeff Carter
"C++: The power, elegance and simplicity of a hand grenade."
Ole-Hjalmar Kristensen
90



      parent reply	other threads:[~2004-12-19 15:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-19  8:44 Random Input-Size and recognizing ENTER-press xadian
2004-12-19 14:50 ` Marius Amado Alves
2004-12-19 16:01   ` Jeffrey Carter
2004-12-19 16:03     ` Pascal Obry
2004-12-19 23:47       ` Jeffrey Carter
2004-12-20 14:36     ` Steve
2004-12-20 23:45       ` Jeffrey Carter
2004-12-19 15:52 ` Jeffrey Carter [this message]
replies disabled

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