Re: keeping IDL !quiet [message #54573] |
Mon, 25 June 2007 07:47  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
hradilv writes:
> One could overload the print procudure, but I don't know how to
> declare a procedure that takes multiple parameters. (BTW, can this be
> done?)
As far as I know, it is not possible to overload intrinsic
IDL commands.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: keeping IDL !quiet [message #54574 is a reply to message #54573] |
Mon, 25 June 2007 07:35   |
Vince Hradil
Messages: 574 Registered: December 1999
|
Senior Member |
|
|
On Jun 22, 8:26 pm, David Fanning <n...@dfanning.com> wrote:
> aske...@gmail.com writes:
>> This is probably a relatively simple question, but I haven't been able
>> to find it in the archives.
>
>> I'm running someone else's program inside of mine, and that program
>> foolishly prints out its results every time through. I tried using !
>> quiet=1, but that doesn't seem to shut it up. Am I right that !quiet
>> stops 'messages' and not 'print' statements? Is there anything else I
>> can do to temporarily stop all print statements?
>
> You could do a global search and replace and change
> all "print," statements to ";print,". That should
> shut it up. :-)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Unless the print statements are "$-continued" to several lines ;-)
One could overload the print procudure, but I don't know how to
declare a procedure that takes multiple parameters. (BTW, can this be
done?)
Of course you could just use, say, 10 parameters and hope that's
enough...
pro print, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9,
arg10, _extra=extra
; do nothing
return
end
|
|
|
|
Re: keeping IDL !quiet [message #54685 is a reply to message #54573] |
Wed, 27 June 2007 06:57  |
Vince Hradil
Messages: 574 Registered: December 1999
|
Senior Member |
|
|
On Jun 25, 9:47 am, David Fanning <n...@dfanning.com> wrote:
> hradilv writes:
>> One could overload the print procudure, but I don't know how to
>> declare a procedure that takes multiple parameters. (BTW, can this be
>> done?)
>
> As far as I know, it is not possible to overload intrinsic
> IDL commands.
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
True, I just tested it. Well I guess to avoid the situation I
mentioned, one could combine our solutions:
1- global replace of print with myPrint
2- write a myPrint procedure to do nothing.
Talk about minutae... (and anal-retentive) I gotta get back to work!
|
|
|