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

Home » Public Forums » archive » problems with IDL reading structures...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
problems with IDL reading structures... [message #7244] Fri, 11 October 1996 00:00
alpha is currently offline  alpha
Messages: 49
Registered: September 1996
Member
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$i

pro test

; when I define a structure...

temp = { name, string: 'test', number: ol }
sttest=replicate(temp,10)
sttest(*).string='any_entry'
sttest(*).number=42

; and i write it to a file

openw,lun,'myfile',/get_lun
for i=1,9 do begin
printf,lun,sttest(i).string
printf,lun,sttest(i).number
endfor
close,lun
free_lun,lun

; now I want to read it

sttest=replicate(temp,10)

openr,lun,'myfile',/get_lun

for i=1,9,do begin
readf,lun,sttest(i).string
readf,lun,sttest(i).number
endfor
close,lun
free_lun,lun

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$


so.. this is crashing at the point of reading
the strings back...

my work arround:

temp=sttest(i).string
readf,lun,temp
sttest(i).string=temp

this is causing no errors but randomly adds some
whitespaces at the end of the strings...

any hints for some elegant solution???


Panther







--
Panther in the Jungle __..--''``\--....___ _..,_
-BELIEVE AND DECEIVE- _.-' .-/"; ` ``<._ ``-+'~=.
http://www.ang-physik _.-' _..--.'_ \ `(^) )
.uni-kiel.de/~hendrik ((..-' (< _ ;_..__ ; `'
[Message index]
 
Read Message
Previous Topic: Using wait in IDL from C
Next Topic: SEG-Y reading codefor IDL

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

Current Time: Fri Oct 10 06:16:54 PDT 2025

Total time taken to generate the page: 2.08067 seconds