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

Home » Public Forums » archive » Re: function to convert string to array???
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: function to convert string to array??? [message #3831 is a reply to message #3821] Thu, 16 March 1995 20:58 Go to previous messageGo to previous message
davis is currently offline  davis
Messages: 15
Registered: March 1995
Junior Member
In article <3k89l3$2ap@news.csus.edu>, Chris McCarthy <chris@quark.sfsu.edu> writes:
: davis@space.mit.edu wrote:
: >
: > Hi,
: >
: > I was wondering if there is a routine that will read a string and convert
: > it to an array of floats. ...
:
: Have you tried reads?
:
: a = 0.d0 & b = 0.d0 & c = 0.d0
: reads,'9.32323 24323.233 22.124235555d-14',a,b,c
: print,c,b,a

The code that I posted uses `reads'. The problem is that you have to
determine how many floats the string is composed of and then allocate an
array of that size.

--John
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: idl vs matlab question
Next Topic: 3d histograms

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

Current Time: Sun Oct 12 09:27:06 PDT 2025

Total time taken to generate the page: 0.79821 seconds