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

Home » Public Forums » archive » Re: 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
Re: Basic format code question [message #50663 is a reply to message #50662] Mon, 16 October 2006 01:42 Go to previous messageGo to previous message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Mon, 16 Oct 2006, Wox wrote:

> 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

This works in IDL 6.2 (linux).

> 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 '-'.
>

What is saved in the file looks like this:

11.0335 11.0503 11.0615 -1.60416e+06 1.05404e+07

regards,
lajos


> 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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Differentiation in IDL
Next Topic: Altered device coordinates after first call

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

Current Time: Sun Oct 12 08:02:37 PDT 2025

Total time taken to generate the page: 0.63992 seconds