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

Home » Public Forums » archive » Suppress print statement from nested procedures
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: Suppress print statement from nested procedures [message #86521 is a reply to message #86507] Fri, 15 November 2013 08:15 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 11/14/13, 4:24 pm, Sam wrote:
> Hello all,
>
> I built a wrapper for a procedure (it calls many others, in turn),
> but the output that was important for the original program is no long
> important. In fact it's quite a nuisance. I'd rather not dig down
> into the subroutines to add the option to turn off printing -- this
> would be a major effort. Is there an IDL equivalent of redirecting to
> /dev/null (or a text file) when calling a procedure from within
> another procedure? In a perfect world, it would be:
>
> pro wrapper [snip] while i lt 1000 do begin [snip] main_procedure >&
> /dev/null [snip] i++ endwhile [snip] end
>
>
> Thanks!
>
> Sam
>

I use MG_LOG for these types of output. I can set a level (CRITICAL,
ERROR, WARNING, INFORMATIONAL, DEBUG) on each message so that the
printed messages can be conditionally printed by being compared to a
global level, i.e., set the level to DEBUG and all messages will be
printed or set the level to CRITICAL and only the CRITICAL messages will
be printed.

You can find MG_LOG here:

https://github.com/mgalloy/mglib/tree/master/src/dist_tools

You will need other stuff from mglib also, so I would grab the whole
library.

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
Read Message
Read Message
Previous Topic: Illegal operand error with window,/free
Next Topic: help with write_gif - Image must be a byte matrix.

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

Current Time: Fri Oct 10 01:50:16 PDT 2025

Total time taken to generate the page: 1.68409 seconds