Basic format code question [message #50665] |
Mon, 16 October 2006 00:49 |
Wox
Messages: 184 Registered: August 2006
|
Senior Member |
|
|
Hi,
Try this:
openw,lun,path,/get_lun
a=[11.0335 , 11.0503 , 11.0615,-1.60416e+006 ,
1.05404e+007]
printf,lun,a
close,lun
free_lun,lun
openr,lun,path,/get_lun
b=fltarr(5)
readf,lun,b ; => this will not work
close,lun
free_lun,lun
What is saved in the file looks like this:
11.0335 11.0503 11.0615-1.60416e+006 1.05404e+007
Problems with the fourth number because of the '-'.
Is this normal behaviour for IDL's default formatting?
Suppose the files are already there (can't set format keyword in
printf), how should I read this file without reading strings (data is
not fltarr(5) but fltarr(50,50,14))? Using format='(E13)' won't work
and you can't use repeat count with readf.
|
|
|