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

Home » Public Forums » archive » 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
type conversion string -> float [message #63583] Fri, 14 November 2008 08:25
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
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
[Message index]
 
Read Message
Previous Topic: array of Julian Days
Next Topic: Re: type conversion string -> float

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

Current Time: Fri Oct 10 14:02:18 PDT 2025

Total time taken to generate the page: 0.88086 seconds