; This procedure demonstrates the findgen, n_elements, and size commands in IDL PRO array_character ; The n_elements function returns the numbe of elements in an array array = FINDGEN(32, 32) help, array print, 'number of elements in array:', n_elements(array) ; what happens if the array is not defined? help, arr print, 'number of elements in arr:',n_elements(arr) ; the size function returns a long vector that conatins the size and type information about ; an array. Optional keywords n_dimensions, dimensions, type, tname, and n_elements return ; the number of dimensions, dimension sizes, type code, type name, and number of ; elements respectively. array = indgen(256, 256) help, array print, 'Size of array is:', size(array) print, '# of dimensions in array:', size(array, /n_dimensions) print, 'dimension sizes of array:', size(array, /dimensions) print, 'type code of array:', size(array, /type) print, 'type name of array:', size(array, /tname) print, 'number of elements in array:', size(array, /n_elements) END