comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » how to tell it is character or it is number?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
how to tell it is character or it is number? [message #55220] Tue, 07 August 2007 08:13 Go to next message
queiny is currently offline  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 Go to previous message
KRDean is currently offline  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,
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Basic Event Handling
Next Topic: Array definition

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:20:46 PDT 2025

Total time taken to generate the page: 0.00531 seconds