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

Home » Public Forums » archive » Re: floats from strings... duh!
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: floats from strings... duh! [message #4356 is a reply to message #4355] Sat, 27 May 1995 00:00 Go to previous messageGo to previous message
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
In article <3q4tku$iqu@dux.dundee.ac.uk>, pjclinch@dux.dundee.ac.uk (Pete Clinch) writes:
>
> I'm sure I'm missing something obvious... want to do the equivalent of a
> C sscanf or atof on a string I've got in a PV~Wave program that has a
> floating point number in string form.
>
> Rather than write my own function to convert "1.234" to 1.234, is there a
> way in the system to do it easily?
>

Use the float() function. It can handle string input.

print, float('1.234')
1.23400

____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Help for non-RSI libraries under IDL 4.0
Next Topic: Shading a band of ranges in pvwave

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

Current Time: Sun Oct 12 01:31:51 PDT 2025

Total time taken to generate the page: 0.79960 seconds