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

Home » Public Forums » archive » Re: using print statement to print to memory or a variable?
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: using print statement to print to memory or a variable? [message #81111 is a reply to message #81110] Thu, 16 August 2012 13:24 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 8/16/12 2:03 PM, Mark Q wrote:
> Pardon me if this is general knowledge, but I'm trying to figure out if it's possible to use a print statement to print to a plot, so to speak.
>
> The basic idea is this. I have some complicated code which eventually contains a line:
>
> printf,lun,"some format here", var1,var2,var3
>
> which prints to the screen or a file.
>
> As I recall, in fortran it's possible to print to memory (or print to a variable), and then to read that string from memory, which I could then send to a plot. For obnoxious reasons, I'd rather do this than rewrite the code to actually generate a character string...
>
> Thanks,
>
> Mark
>

STRING and PRINT/PRINTF take arguments and format strings in the same
manner, so it's not hard to change between them, i.e.,

printf, lun, a, b, c, format=format_string

or

s = string(a, b, c, format=format_string)

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: tlb_frame_attr in Mac
Next Topic: Re: tlb_frame_attr in Mac

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

Current Time: Sun Oct 12 14:47:21 PDT 2025

Total time taken to generate the page: 1.03998 seconds