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

Home » Public Forums » archive » Re: type conversion string -> float
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: type conversion string -> float [message #63582 is a reply to message #63581] Fri, 14 November 2008 08:58 Go to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Nov 14, 10:25 am, Paolo <pgri...@gmail.com> wrote:
> Hi,
>
> does anybody have a simple way to find out
> if a string represents a valid float number or not?
>
> For example, it should recognize
> 43
> 123.654773
> 12E-003
> 5.
>
> as valid numbers,
> but should reject
>
> 12B45
> 23-45-2
> 32EE21
> 15$
>
> (Note that float() will happy convert 13A2 but not A132...)
>
> Ciao,
> Paolo

I use Ray Sterner's ISNUMBER()
http://www.astro.washington.edu/deutsch-bin/getpro/library09 .html?ISNUMBER
or http://tinyurl.com/6hgpkv
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: type conversion string -> float
Next Topic: Re: conditional operator

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

Current Time: Sun Oct 12 00:09:14 PDT 2025

Total time taken to generate the page: 0.63476 seconds