;----------------------------------------------------------------- ; pleh.pro ; ; written by Andreas Reigber ;------------------------------------------------------------------ ; Like the help command, but gives more information about the array. ; The name is just 'help' written backwards, and it expresses very ; good what I think when I debug my programs and have to use pleh. ; ; Usage: ; pleh,arr ;------------------------------------------------------------------ ; This software has been released under the terms of the GNU Public ; license. See http://www.gnu.org/copyleft/gpl.html for details. ;------------------------------------------------------------------ pro pleh,arr on_error,2 type=['Undefined','Byte','Integer','Longword integer','Floating point', $ 'Double-precision floating','Complex floating','String','Structure', $ 'Double-precision complex','Pointer','Object reference','Unsigned Integer', $ 'Unsigned Longword Integer','64-bit Integer','Unsigned 64-bit Integer'] byt=[0,1,4,8,4,8,8,0,0,16,0,0,2,4,8,8] s = size(arr) print,'Type : ',type[s[s[0]+1]] if s[0] gt 0 then begin print,'Size : ',strcompress(s[1:s[0]]) anz = s[s[0]+2] siz = anz*byt[s[s[0]+1]] memstr = '' if siz ne 0 then begin mst = strcompress(siz)+' Bytes' if siz gt 1000000 then begin siz = siz/1000000.0 mst = strcompress(siz)+' MB' endif else begin if siz gt 1000 then begin siz = siz/1000.0 mst = strcompress(siz)+' KB' endif endelse print,'Memory : ',mst endif print,'Minimum : ',min(arr) print,'Maximum : ',max(arr) print,'Mean : ',mean(arr) print,'Stddev : ',stdev(arr) endif else begin print,'Content : ',arr endelse end