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

Home » Public Forums » archive » reading multiple data types into arrays
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
reading multiple data types into arrays [message #54720] Mon, 09 July 2007 15:36
Josh is currently offline  Josh
Messages: 21
Registered: June 2007
Junior Member
Hi,

I'm trying to read in data from a file that has the following format:

231359152 09/25/2003 18:38:35.816 20.013574 25.668425
626.779 14.396667

I'm having no problems getting the fourth, fifth, and sixth columns of
data into double arrays with a statement like this:

readf, lun, recNum, date, time, lat, lon, elev, geoid

and a for loop. But I would like to get the second column in an
array, too. My intuition says it should be a string because of the
nasty /'s in it (ultimately, I'd like these dates to be the
independant axis values).

I tried declaring the variable date as a string beforehand (date = '
'), but then that slurps the entire line (all columns) into that
variable. If I don't declare it as a string and try to put it into a
string array (strArr), it becomes 9.00000.

I'm reading the documentation for explicitly formatted input, but am
having trouble figuring out how to apply it here.

As always, all suggestions are greatly appreciated!
-Josh
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: webget
Next Topic: Re: Tab completion of variables and routines at the IDL command line

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

Current Time: Thu Oct 09 23:12:06 PDT 2025

Total time taken to generate the page: 0.64189 seconds