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

Home » Public Forums » archive » Re: maximum line length with printf?
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: maximum line length with printf? [message #44744 is a reply to message #44672] Sun, 10 July 2005 23:48 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
francesca_terenzi@yahoo.it wrote:
> Ooops...
>
> I've just notices that you last variable: '�doy" is not an array,
> while all the other 5 are. Is that right?
> I think in this case what I've said above will not work either.
> I am not awared of what Ben told you above, but if that does not work
> either, ...here is anoother idea...
> Why do not you save the "doy" variable separately from the other data?
> I mean, something like:
>
> openw,1,fileout
> printf,1,doy
> for m=0,M-1 do begin
> prinft,1,data[0,m],data[1,m],data[2,m],�data[3,m],data[ 4,m],data[5,m]
> endfor
> close,1
>



You should better use
openw,lun,/get_lun, filename

and at the end

free_lun,lun

Because then you don't get into the trouble if somewhere a fixed unit is
already in usage.

If you add width as keyword you can setup a longer width as the detault one.


I am not sure what the loop is used for. Didn't you get the same result
by prinft,lun,data. Probably you only need to transpose?


Idl does not be case sensitive so you see me a bit surprised that's this
work. I would have bet against this

m=5
for m=0,M-1 do begin

For better coding I would suggest to rename M to n_from_what_it_is, and
to use i as increment var. But that's a question of reading/writing style.

cheers

Reimar

--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Announcing GDL 0.8.10
Next Topic: Giving Up on Windows

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

Current Time: Thu Oct 09 19:12:07 PDT 2025

Total time taken to generate the page: 0.72071 seconds