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

Home » Public Forums » archive » Re: Writing arrays to text file - format code trickery?
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: Writing arrays to text file - format code trickery? [message #78421 is a reply to message #78420] Mon, 28 November 2011 05:13 Go to previous message
rjp23 is currently offline  rjp23
Messages: 97
Registered: June 2010
Member
On Nov 28, 12:36 pm, Rob <rj...@le.ac.uk> wrote:
> I've inherited some code which does something along the lines of the
> following:
>
> FOR i = 0L, 359 DO printf,unit,A[0,0,i],
> A[0,1,i],A[0,2,i],A[0,3,i],A[0,4,i],A[0,5,i],format='(6(2X, E15.8))'
>
> where A is [2, 6, 360]
>
> Now this is done quite a lot and becomes horribly slow. Is there a
> clever way I can use the format code to do it with fewer (one?) print
> statements? (Maybe by juggling the array around first?)
>

Ah it's simply this isn't it?

printf,unit,A[0,*,*],format='(6(2X, E15.8))'
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Writing arrays to text file - format code trickery?
Next Topic: Re: create an UTM grid

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

Current Time: Sat Oct 11 09:32:11 PDT 2025

Total time taken to generate the page: 2.15977 seconds