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

Home » Public Forums » archive » String array Read and Write
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
String array Read and Write [message #87151] Fri, 10 January 2014 21:09 Go to previous message
Gompie is currently offline  Gompie
Messages: 76
Registered: August 2012
Member
Hi,
I get garbage when I read in a array of strings that I had written using the following code

openw, lun, 'test.dat', /get_lun

afilename=bytarr(256,N)

read in N afilenames...

afilenames_temp=string(afilename(0:255,N) )


writeu, lun,afilenames_temp(0:N-1)
close,lun
* Here If I give pring afilenames_temp(0:10) I get first 11 file complete names
Looks like afilenames_temp has all the info that I needed to store in it and I should have written it into the binary file...

However when I read test.dat with the following code I get garbage.


openr, lun, 'test.dat', /get_lun
afile = string(lengths+1)
readu, lun,afile

Can anybody help...
GlanPlon !!
[Message index]
 
Read Message
Read Message
Previous Topic: Overplot cgplot on Function Graphic Plot
Next Topic: Active main program terminated by call to DELVAR when using Delvar

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

Current Time: Wed Oct 08 13:32:41 PDT 2025

Total time taken to generate the page: 0.00583 seconds