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

Home » Public Forums » archive » Re: Suppressing diagnostic messages en masse
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: Suppressing diagnostic messages en masse [message #47322 is a reply to message #47321] Thu, 02 February 2006 16:57 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ed Hyer writes:

> I am engaged in semi-permanent debugging of some pretty long scripts,
> which in the course of developing I have peppered with PRINT statements
> to achieve various diagnostic ends.
>
> I don't think the script is "final," whatever that means, but it's time
> to do some production runs, where the script will be invoked 10,000
> times, instead of the usual 1.
>
> I can do a search-and-replace to comment out the diagnostics for this
> purpose, but what would really be nice is if I could somehow put a
> keyword flag into the routine that, when set, would suppress|promote
> the diagnostic messages. Sounds like the sort of thing that might
> exist. Anyone know how to do this?

Had you thought to use MESSAGE to achieve your "various
diagnostic ends", you would be golden. Just set !Quiet=1
and run the darn thing. No messages.

But PRINT is going to print, no matter what.

;******************************************************
PRO test

Print, 'This is PRINT message'
Message, 'This is a message from MESSAGE.', /Informational

end
*********************************************************

IDL> .COMPILE test
Compiled module: TEST.
IDL> test
This is PRINT message
TEST: This is a message from MESSAGE.
IDL> !Quiet=1
IDL> test
This is PRINT message


Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Widget creation performance
Next Topic: !PATH variable, current directory, and .COMPILE problems

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

Current Time: Sun Oct 12 07:31:06 PDT 2025

Total time taken to generate the page: 3.19603 seconds