idlwave-routine-info.pro

idlwave-routine-info.pro is a variable defined in `idlwave.el'.
Its value is

"\n;; START OF IDLWAVE SUPPORT ROUTINES\npro idlwave_print_safe,item,limit\n catch,err\n if err ne 0 then begin\n print,'Could not print item.'\n return\n endif\n if n_elements(item) gt limit then $\n print,item[0:limit-1],'<... truncated at ',strtrim(limit,2),' elements>' $\n else print,item\nend\n\npro idlwave_print_info_entry,name,func=func,separator=sep\n ;; See if it's an object method\n if name eq '' then return\n func = keyword_set(func)\n methsep = strpos(name,'::')\n meth = methsep ne -1\n\n ;; Get routine info\n pars = routine_info(name,/parameters,functions=func)\n source = routine_info(name,/source,functions=func)\n nargs = pars.num_args\n nkw = pars.num_kw_args\n if nargs gt 0 then args = pars.args\n if nkw gt 0 then kwargs = pars.kw_args\n\n ;; Trim the class, and make the name\n if meth then begin\n class = strmid(name,0,methsep)\n name = strmid(name,methsep+2,strlen(name)-1)\n if nargs gt 0 then begin\n ;; remove the self argument\n wh = where(args ne 'SELF',nargs)\n if nargs gt 0 then args = args[wh]\n endif\n endif else begin\n ;; No class, just a normal routine.\n class = \"\"\n endelse\n\n ;; Calling sequence\n cs = \"\"\n if func then cs = 'Result = '\n if meth then cs = cs + 'Obj -> [' + '%s' + '::]'\n cs = cs + '%s'\n if func then cs = cs + '(' else if nargs gt 0 then cs = cs + ', '\n if nargs gt 0 then begin\n for j=0,nargs-1 do begin\n cs = cs + args[j]\n if j lt nargs-1 then cs = cs + ', '\n endfor\n end\n if func then cs = cs + ')'\n ;; Keyword arguments\n kwstring = ''\n if nkw gt 0 then begin\n for j=0,nkw-1 do begin\n kwstring = kwstring + ' ' + kwargs[j]\n endfor\n endif\n\n ret=(['IDLWAVE-PRO','IDLWAVE-FUN'])[func]\n\n print,ret + ': ' + name + sep + class + sep + source[0].path $\n + sep + cs + sep + kwstring\nend\n\npro idlwave_routine_info,file\n on_error,1\n sep = '<@>'\n print,'>>>BEGIN OF IDLWAVE ROUTINE INFO (\"' + sep + '\" IS THE SEPARATOR)'\n all = routine_info()\n fileQ=n_elements(file) ne 0\n if fileQ then file=strtrim(file,2)\n for i=0L,n_elements(all)-1L do begin\n if fileQ then begin\n if (routine_info(all[i],/SOURCE)).path eq file then $\n idlwave_print_info_entry,all[i],separator=sep\n endif else idlwave_print_info_entry,all[i],separator=sep\n endfor\n all = routine_info(/functions)\n for i=0L,n_elements(all)-1L do begin\n if fileQ then begin\n if (routine_info(all[i],/FUNCTIONS,/SOURCE)).path eq file then $\n idlwave_print_info_entry,all[i],separator=sep,/FUNC\n endif else idlwave_print_info_entry,all[i],separator=sep,/FUNC\n endfor\n print,'>>>END OF IDLWAVE ROUTINE INFO'\nend\n\npro idlwave_get_sysvars\n on_error,1\n catch,error_status\n if error_status ne 0 then begin\n print, 'Cannot get info about system variables'\n endif else begin\n help,/brief,output=s,/system_variables ; ? unsafe use of OUTPUT=\n s = strtrim(strjoin(s,' ',/single),2) ; make one line\n v = strsplit(s,' +',/regex,/extract) ; get variables\n for i=0L,n_elements(v)-1 do begin\n t = [''] ; get tag list\n a=execute('if n_tags('+v[i]+') gt 0 then t=tag_names('+v[i]+')')\n print, 'IDLWAVE-SYSVAR: '+v[i]+' '+strjoin(t,' ',/single)\n endfor\n endelse\nend\n\npro idlwave_get_class_tags, class\n res = execute('tags=tag_names({'+class+'})')\n if res then print,'IDLWAVE-CLASS-TAGS: '+class+' '+strjoin(tags,' ',/single)\nend\n;; END OF IDLWAVE SUPPORT ROUTINES\n"

  • This variable may be risky if used as a file-local variable.

Documentation:
The IDL programs to get info from the shell.