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

Home » Public Forums » archive » Basic format code question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Basic format code question [message #50665] Mon, 16 October 2006 00:49
Wox is currently offline  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.
[Message index]
 
Read Message
Previous Topic: Re: idl syntax validation
Next Topic: Differentiation in IDL

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

Current Time: Wed Oct 08 16:06:57 PDT 2025

Total time taken to generate the page: 0.00432 seconds