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

Home » Public Forums » archive » subverting IDL builtin variables !FORMYOWNPURPOSES
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
subverting IDL builtin variables !FORMYOWNPURPOSES [message #75258] Fri, 18 February 2011 16:41
MarioIncandenza is currently offline  MarioIncandenza
Messages: 231
Registered: February 2005
Senior Member
This is a terrible idea, but I'll feel better about doing it one of
the Hard Ways once I've committed this awful cheat to posterity.

The package has ~100 subroutines, and each subroutine has various
types of output. All of this output ends up in logs, but now that the
whole creature is built, it's time to set different levels of
verbosity. My simple scheme is like this:
DEBUG=0; put nothing in the log except fatal errors;
DEBUG=1; include warnings and limited diagnostics;
DEBUG=2; include full diagnostics, performance-related
information, the kitchen sink.

Now, I can think of three ways to do this:
1) Pass a VERBOSITY keyword from the top level through all of the
subroutines. I'm not going to change 100 headers to add this (though I
am going to change ~200 PRINT statements to IF(VERBOSITY gt XX) THEN
PRINT).
2) Create a common block for the VERBOSITY level. I've never done
this, but it seems like the right solution for this problem.
3) Put the VERBOSITY into a !VARIABLE that isn't being used for
anything else. There are plenty to choose from, especially since this
package doesn't actually generate any graphics, etc.

Solution #3 is so easy... so wrong... so easy. Oh well.
Have a great weekend, everybody.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: cgtext and resizeable graphics window
Next Topic: Large H5

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

Current Time: Wed Oct 08 13:47:00 PDT 2025

Total time taken to generate the page: 0.00506 seconds