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

Home » Public Forums » archive » Read data as array structure
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Read data as array structure [message #79202] Fri, 03 February 2012 00:32 Go to previous message
Tasos is currently offline  Tasos
Messages: 4
Registered: February 2012
Junior Member
Hello,

I am trying to define an array structure having a string parameter and
floats, in order to read a data file. The problem is, when I define
the first parameter of the structure as a string and then read the
file, this string parameter contains the data of the whole line and
not the first data entry. I guess by giving you an example would be
much easier to understand my problem...

Let's say that I have the data file below with this entries...
name 0.386216 1286.08
name 0.391236 1080.36

I first create the array structure...
dataStruct = { name:'' p2:0.0, p3:0.0 }

...with two lines
data = replicate(dataStruct, 2)

and then read the data.
readf, lun, data

I then get the error --> % READF: Input conversion error. Unit: 100

How I can avoid the problem of the string variable reading the whole
line of the data file?

PS. Of course I would like an answer which is related on the array
structure and not how to just read the data from the file!

Thanks!
Tas
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Read data
Next Topic: Quickbird RPC

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

Current Time: Wed Oct 08 11:29:57 PDT 2025

Total time taken to generate the page: 0.00439 seconds