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

Home » Public Forums » archive » read a file written in fortran
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: read a file written in fortran [message #71289 is a reply to message #71186] Wed, 09 June 2010 05:17 Go to previous messageGo to previous message
Thibault Garel is currently offline  Thibault Garel
Messages: 55
Registered: October 2009
Member
OK, thanks


> bing999 wrote:
>> For information, here is how i wrote the file in fortran:
>
>> write(my_unit,'(9e14.6,L1)') a,b,c,d,e,f,g,h,i,my_logical
>
>> Then, how to read a L1 format in IDL?
>
> ; Define true/false explicitly
> FALSE = 0
> TRUE  = 1
>
> ; Read the file
> tmp = ""
> readf, your_unit, format='(9e14.6,a1)', a,b,c,d,e,f,g,h,i,tmp
>
> ; Process the logical
> case strupcase(tmp) of
>   'T': my_logical=TRUE
>   'F': my_logical=FALSE
>   ELSE: message,'invalid logical!'
> endcase
>
> ??
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Coyote Graphics Update 30 Jan 2011
Next Topic: Re: Y2 axis title orientation

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

Current Time: Thu Oct 09 20:02:29 PDT 2025

Total time taken to generate the page: 0.48195 seconds