comp.lang.ada
 help / color / mirror / Atom feed
From: "Paul" <pcas1986@bigpond.net.au>
Subject: Re: determining input data type
Date: Sat, 18 Oct 2008 06:17:35 GMT
Date: 2008-10-18T06:17:35+00:00	[thread overview]
Message-ID: <3cfKk.6357$sc2.1778@news-server.bigpond.net.au> (raw)
In-Reply-To: M8bKk.392682$yE1.130775@attbi_s21

Or you could test for characters in the range '0' .. '9'.  You'll still need 
to wrap it up inside an exception handler.

Paul

"Jeffrey R. Carter" <spam.jrcarter.not@spam.acm.org> wrote in message 
news:M8bKk.392682$yE1.130775@attbi_s21...
> jedivaughn wrote:
>> Hi, How is the best way to determine the type of input. I have the
>> input coming in through a string but if the contents of the string is
>> an integer then I want to convert it to such. This seems like it
>> should be very easy to do but I can't seem to find out how to do it
>> any where.
>
> You could use Integer'Value. If it succeeds, than it represents an 
> Integer. If it fails, then it doesn't.
>
> -- 
> Jeff Carter
> "Why don't you bore a hole in yourself and let the sap run out?"
> Horse Feathers
> 49 





  reply	other threads:[~2008-10-18  6:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-18  0:48 determining input data type jedivaughn
2008-10-18  1:41 ` Jeffrey R. Carter
2008-10-18  6:17   ` Paul [this message]
2008-10-18  6:53 ` deadlyhead
2008-10-18  8:00   ` Dmitry A. Kazakov
2008-10-18 18:54 ` anon
2008-10-20 11:01   ` jedivaughn
replies disabled

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