general/misc/SSW/
dprint.pro
PROJECT: General Purpose SOHO - CDS/SUMER THEMIS NAME: DPRINT PURPOSE: Diagnostic PRINT (activated only when DEBUG reaches DLEVEL) EXPLANATION: This routine acts similarly to the PRINT command, except that it is activated only when the common block variable DEBUG is set to be equal to or greater than the debugging level set by DLEVEL (default to 0). It is useful for debugging. If DLEVEL is not provided it uses a persistent (common block) value set with the keyword SETDEBUG. CALLING SEQUENCE (typically written into code): DPRINT, v1 [,v2 [,v3...]]] [,format=format] [,dlevel=dlevel] [,verbose=verbose] The values of v1,v2,v3 will only be printed if verbose >= dlevel CALLING SEQUENCE to change options (typically typed from IDL command line - Don't put these lines in code!!!) DPRINT, setdebug=2 ; define persistent debug level (2 is typical level) DPRINT, SETVERBOSE=2 ; Same as above DPRINT, print_trace=[0,1,2,3, or 4] ; Display program trace info in subsequent calls to DPRINT DPRINT, /print_dlevel ; Display current dlevel and verbose settings. DPRINT, /print_dtime ; Display delta time between DPRINT statements. INPUTS: V1, V2, ... - List of variables to be printed out (20 max). OPTIONAL INPUTS: None. OUTPUTS: All input variables are printed out on the screen (or the given unit) OPTIONAL Keywords: FORMAT - Output format to be used UNIT - Output unit through which the variables are printed. If missing, the standard output (i.e., your terminal) is used. KEYWORD PARAMETERS: DLEVEL = DLEVEL - An integer indicating the debugging level; defaults to 0 VERBOSE = VERBOSE - An integer indicating current verbosity level, If verbose is set it will override the current value of SETVERBOSE, for the specific call of dprint in which it is set. SETVERBOSE=value - Set debug level to value SETDEBUG=value - Same as SETVERBOSE GETDEBUG=named variable - Get current debug level DWAIT = NSECONDS ; provides an additional constraint on printing. It will only print if more than NSECONDS has elapsed since last dprint. CHECK_EVENTS= [0,1] - If set then WIDGET events are captured and processed within DPRINT BREAK_DETECTED= named variable - Used to break out of user routines (see DPRINTTOOL) COMMON BLOCKS: DPRINT_COM. RESTRICTIONS: - Changed see SETDEBUG above Can print out a maximum of 20 variables (depending on how many is listed in the code) SIDE EFFECTS: Generally None. CATEGORY: Utility, miscellaneous PREVIOUS HISTORY: Written March 18, 1995, Liyun Wang, GSFC/ARC MODIFICATION HISTORY: Version 1, Liyun Wang, GSFC/ARC, March 18, 1995 Version 2, Zarro, SM&A, 30 November 1998 - added error checking Version 3, Zarro, (EIT/GSFC), 23 Aug 2000 - removed DATATYPE calls Version 4, Larson (2007) stripped out calls to "execute" so that it can be called from IDL VM Fixed bug that allows format keyword to be used. Added SETDEBUG keyword and GETDEBUG keyword Added DWAIT keyword Added PRINT_TRACE,PRINT_DTIME,PRINT_DLEVEL Added Widget options $LastChangedBy: davin-mac $ $LastChangedDate: 2014-12-09 15:53:06 -0800 (Tue, 09 Dec 2014) $ $LastChangedRevision: 16427 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/misc/SSW/dprint.pro $
Routines
top source DPRINT
DPRINT, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, format=format, dlevel=dlevel, verbose=verbose, setdebug=setdebug, setverbose=setverbose, getdebug=getdebug, filename=filename, print_dlevel=print_dlevel, check_events=check_events, no_check_events=no_check_events, get_check_events=get_check_events, print_time=print_time, print_dtime=print_dtime, print_trace=print_trace, display_object=display_object, set_display_object=set_display_object, status=status, break_requested=break_requested, dwait=dwait, reset=reset, sublevel=sublevel, get_dprint_struct=get_dprint_struct, help=help, phelp=phelp, unit=unit
Parameters
- v1
- v2
- v3
- v4
- v5
- v6
- v7
- v8
- v9
- v10
- v11
- v12
- v13
- v14
- v15
- v16
- v17
- v18
- v19
- v20
Keywords
- format
- dlevel
- verbose
- setdebug
- setverbose
- getdebug
- filename
- print_dlevel
- check_events
- no_check_events
- get_check_events
- print_time
- print_dtime
- print_trace
- display_object
- set_display_object
- status
- break_requested
- dwait
- reset
- sublevel
- get_dprint_struct
- help
- phelp
- unit
File attributes
Modification date: | Wed Dec 10 10:08:32 2014 |
Lines: | 188 |