how to tell it is character or it is number? [message #55220] |
Tue, 07 August 2007 08:13  |
queiny
Messages: 15 Registered: November 2005
|
Junior Member |
|
|
Hi,
I am reading in many line of mixed characters and numbers.
AA,01,02,003,andefg
BB,02,03,006,edjkflg
......
FF,01,02,abc,eirjfdkf
......
I need information from the 4th field, which can be either number or
character. After I parsed the long records, I singled out this field.
Is there a way I can tell whether it is numbers or it is characters?
'fix' command can convert the numbers, it will give an error message
then continue to the execution.
Thanks,
|
|
|
Re: how to tell it is character or it is number? [message #55279 is a reply to message #55220] |
Wed, 08 August 2007 07:33  |
KRDean
Messages: 69 Registered: July 2006
|
Member |
|
|
There is a nice routine call is_numeric.pro on the ITTVIS InfoNet in
the code contribution section for IDL. I find it useful on many
occasions.
Kelly Dean
Fort Collins, CO
On Aug 7, 9:13 am, queiny <quein...@yahoo.com> wrote:
> Hi,
>
> I am reading in many line of mixed characters and numbers.
>
> AA,01,02,003,andefg
> BB,02,03,006,edjkflg
> ......
> FF,01,02,abc,eirjfdkf
> ......
>
> I need information from the 4th field, which can be either number or
> character. After I parsed the long records, I singled out this field.
> Is there a way I can tell whether it is numbers or it is characters?
> 'fix' command can convert the numbers, it will give an error message
> then continue to the execution.
>
> Thanks,
|
|
|