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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e2413c4fccb33dbc X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!209.244.4.230!newsfeed1.dallas1.level3.net!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!lon-transit.news.telstra.net!lon-in.news.telstra.net!news.telstra.net!news-server.bigpond.net.au!53ab2750!not-for-mail From: "Paul" Newsgroups: comp.lang.ada References: Subject: Re: determining input data type X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Response Message-ID: <3cfKk.6357$sc2.1778@news-server.bigpond.net.au> Date: Sat, 18 Oct 2008 06:17:35 GMT NNTP-Posting-Host: 121.223.194.116 X-Complaints-To: abuse@bigpond.net.au X-Trace: news-server.bigpond.net.au 1224310655 121.223.194.116 (Sat, 18 Oct 2008 17:17:35 EST) NNTP-Posting-Date: Sat, 18 Oct 2008 17:17:35 EST Organization: BigPond Internet Services Xref: g2news2.google.com comp.lang.ada:8166 Date: 2008-10-18T06:17:35+00:00 List-Id: 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" 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