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 #4359 is a reply to message #4357] Fri, 26 May 1995 00:00 Go to previous messageGo to previous message
afl is currently offline  afl
Messages: 51
Registered: December 1994
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?
|>
|> Thanks.
|>
|> Pete.
|> --
|> Peter Clinch Dundee Teaching Hospitals NHS Trust
|> voice: 44 1382 660111 x 3637 snail: Directorate of Medical Physics
|> fax: 44 1382 640177 Ninewells Hospital
|> email: p.j.clinch@dundee.ac.uk Dundee DD1 9SY Scotland UK


Again, I may be missing the boat here, but is this what you want?

IDL> a = '1.234'
IDL> b = float(a)
IDL> help, b
B FLOAT = 1.23400


--

Andrew F. Loughe email: afl@cdc.noaa.gov
University of Colorado, CIRES voice: (303) 492-0707
Campus Box 449 fax: (303) 497-7013
Boulder, CO 80309-0449 USA
[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 07:06:07 PDT 2025

Total time taken to generate the page: 0.55788 seconds