Re: Testing for Numbers within Text

From: Pradhan <empradhan_at_dplus.net>
Date: Sat, 31 Jul 1999 20:30:48 -0400
Message-ID: <pxMo3.56$jt.183_at_newsfeed.slurp.net>


Hi
read a charater in a string
then

if ascii(v_character) >=ascii('0') and ascii(v_character) <= ascii('9') then

    v_character is an integer

HTH
pradhan
Simon Hedges wrote in message <7nvtvj$d46$1_at_news8.svr.pol.co.uk>...
>Does anyone have any tips for checking with a specified character within a
>string
>is numeric or not?
>
>I guess I could do lots of nested 'ifs', (i.e. if v_character = '1' then...
>elsif v_character = '2' then... elsif... ) but I wondered if there was a
>more efficient and elegant solution.
>
>Any ideas?
>
>
>Simon Hedges
>Gloucester
>UK
>
>
Received on Sun Aug 01 1999 - 02:30:48 CEST

Original text of this message