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

Home » Public Forums » archive » Re: Implied do loops in IDL
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: Implied do loops in IDL [message #2249 is a reply to message #2245] Tue, 14 June 1994 07:33 Go to previous messageGo to previous message
landers is currently offline  landers
Messages: 45
Registered: May 1993
Member
In article <tonym.1121921004A@llyene.jpl.nasa.gov>, tonym@lurleen.jpl.nasa.gov (Tony Mannucci) writes:
|> In FORTRAN, the file was written as:
|>
|> write(unit) n, (data(i), i = 1, n)
|>
|> and read as:
|>
|> read(unit) n, (data(i), i=1, n)

you could do something like this:

openr, unit,/Get_Lun, filename, /f77_Unformatted
; ....
while( reading_these_lines) do begin

file = fstat( unit ) ; remember where record begins
n = 0L ; make sure you read the right data type
readu, unit, n ; read the data count
data = fltarr( n ) ; make data array
point_lun, unit, file.cur_ptr ; rewind to the beginning of the record
readu, unit, n, data ; re-read the record, with data

; ... process data ...

end


;Dave
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Problems with Idl and Irix 5.2-alpha
Next Topic: Re: missing data

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

Current Time: Sun Nov 30 18:22:01 PST 2025

Total time taken to generate the page: 3.04004 seconds