function str_help, struct, quiet=quiet, nobox=nobox, loud=loud, $ header=header ; ;+ ; Name: str_help ; ; Purpose: return text description of structure and tags ; ; Input Parameters: ; struct - structure input ; ; Keyword Parameters: ; loud - if set, print output to tty ; nobox - if set, dont draw box around output ; ; History: ; 19-Jan-1998 - S.L.Freeland (written for www/idl diagnostics, etc) ; ;- ; quiet=1-keyword_set(loud) or keyword_set(quiet) nt=n_tags(struct) if nt eq 0 then begin outval='Input: ' + fmt_tag(size(struct)) + ' ...is not a structure' endif else begin names=tag_names(struct) outarr=strarr(nt) for i=0,nt-1 do begin tag=struct(0).(i) case 1 of data_chk(tag,/struct): outarr(i)='{'+tag_names(tag,/str)+'}' data_chk(tag,/scalar,/string): outarr(i)='"' + strmid(tag,0,80)+'"' else: outarr(i)=fmt_tag(size(tag)) endcase endfor outval=strjustify(['TAGNAMES',names]) + ': ' + strjustify(['CONTENTS',outarr]) if keyword_set(header) then outval=[' STRUCTURE: '+ tag_names(struct,/str) ,$ ' Number Tags: ' + strtrim(nt,2) ,'',outval] endelse box_message,outval,btext=btext, quiet=quiet if not keyword_set(nobox) then outval=btext return,outval end