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

Home » Public Forums » archive » reading data into structs (was (no subject))
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
reading data into structs (was (no subject)) [message #4832] Mon, 07 August 1995 00:00
rep2857 is currently offline  rep2857
Messages: 28
Registered: December 1994
Junior Member
In article <404p8u$v44@seralph9.essex.ac.uk>,
Pearson J E <jepear@essex.ac.uk> wrote:
> A small problem I am having in pvwave.
>
> How do you read in values from data files into structs?
>
> Any help would be appreciated.

Cc'd to jepear@essex.ac.uk

You'll need to create a temporary variable to hold the data being read
and then store that temporary data into the struct. A "feature" in
the way WAVE handles structure tags is that they cannot get assigned
directly from a function call keyword (also true for IDL).

Something along the lines of this ought to work:

tdata = intarr(2, /nozero)
data = intarr(2, 400, /nozero)
openr, lun, file, /get_lun
for i = 0, 399 do begin
readu, lun, tdata
data(*,i) = tdata
endfor

Mike Schienle Hughes Santa Barbara Research Center
Home: mgs@seldon.terminus.com Work: rep2857@sbsun0010.sbrc.hac.com
Contract Employee - Will visualize data for large amounts of money
[Message index]
 
Read Message
Previous Topic: Adaptive Filter
Next Topic: Re: Getting plot coor by clicking on plot??

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

Current Time: Sat Oct 11 12:37:00 PDT 2025

Total time taken to generate the page: 0.88264 seconds