;+ ; NAME: ; CH ; ; PURPOSE: ; CH provides command line access to the CoolHelp object. The Cool Help object is stored as ; a system variable. CH creates the system variable if it has not be defined (yet) when called. The object ; is destroyed when you quit (or reset) the IDL session. ; ; ARGUMENTS: ; QR The string scalar name of the routine to query. (Default = '!CPU') ; ; OPTIONAL KEYWORDS: ; DEBUG Set this keyword to enable error traceback (default = 0) ; BRIEF Set this keyword to show only routine syntax (default = 0) ; NOGUI Set this keyword to direct output to output log rather than to GUI (default = 0) ; HISTORY_LENGTH Set this keyword to the the number of procedures to retain ; in the history list (default = 10) ; ; CALLING SEQUENCE: ; ch, 'atan' ; ; REQUIREMENTS: ; Must have 'CoolHelp_idl55_help_routines.txt' located in your !Path. ; Must have COOLHELP__DEFINE.pro ; ; ; MODIFICATION HISTORY: ; June 2002 Written by Andrew Cool and Ben Tupper. ; July 2002 Added keyword pass through. ;- PRO ch, qr,brief = brief, debug = debug, nogui = nogui, history_length = history_length NoUpDateHistory = 0 If n_elements(qr) Eq 0 Then Begin NoUpDateHistory = 1 qr = '!CPU' EndIf qr = STRUPCASE(qr) ;is the system variable define already? DefSysV, '!ch', exist = exist If Exist EQ 1 Then Begin ;is the object valid? If Obj_Valid(!ch) Eq 0 Then Begin ch_obj = Obj_new('CoolHelp', _extra = extra) DefSysV,'!ch' ,ch_obj EndIf EndIf Else Begin ch_obj = Obj_new('CoolHelp', _extra = extra) DefSysV,'!ch' , ch_obj EndElse If n_elements(Debug) NE 0 Then !CH->SetProperty, debug = KeyWord_Set(debug) If n_elements(Brief) NE 0 Then !CH->SetProperty, Brief= KeyWord_Set(Brief) If n_elements(NoGUI) NE 0 Then !CH->SetProperty, NoGUI = KeyWord_Set(NoGUI) If n_elements(History_Length) NE 0 THen !CH->SetProperty, History_Length = History_Length !ch->GUI, qr = qr, NoUpDateHistory = NoUpDateHistory END