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

Home » Public Forums » archive » Re: redirecting output
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: redirecting output [message #40168 is a reply to message #40163] Fri, 16 July 2004 08:02 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
kl_tah@hotmail.com (KL) writes:
> Hi,
> anyone know how I can redirect output from the idl command line to a file?
>
> eg. if idl understood unix style redirect, this might look something like
>
> IDL> print, structure.name > filename

Nigel had a good suggestion.

There's also the good ole' open-print-close approach, as in,

openw, unit, filename, /get_lun
print, unit, structure.name
...
free_lun, unit

Or, you could capture the output in a string and then save it later.
I use this all the time with my PRINTLOG routine,

printlog, log=log, structure.name
printlog, log=log, structure.value, format='(G9.2)'
...

and then you can do anything with the LOG array that you want. It's
just an array of strings, containing a transcript of what you printed
to it.

Good luck,
Craig

P.S. PRINTLOG is at:
http://cow.physics.wisc.edu/~craigm/idl/idl.html

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Broyden's method
Next Topic: change in syntax for version 6?

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

Current Time: Sat Oct 11 08:42:26 PDT 2025

Total time taken to generate the page: 1.03945 seconds