isarray.pro

来自「basic median filter simulation」· PRO 代码 · 共 45 行

PRO
45
字号
;-------------------------------------------------------------;+; NAME:;       ISARRAY; PURPOSE:;       Tests if the argument is an array.; CATEGORY:; CALLING SEQUENCE:;       flag = isarray(a); INPUTS:;       a = variable to test.                                in; KEYWORD PARAMETERS:; OUTPUTS:;       flag = test result: 0 if not array, else non-zero.   out; COMMON BLOCKS:; NOTES:; MODIFICATION HISTORY:;       R. Sterner  20 Mar, 1986.;       Checked for undefined variables.  RES 25 Aug, 1989.;       Johns Hopkins Applied Physics Lab.;; Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory; This software may be used, copied, or redistributed as long as it is not; sold and this copyright notice is reproduced on each copy made.  This; routine is provided as is without any express or implied warranties; whatsoever.  Other limitations apply as described in the file disclaimer.txt.;	Converted to IDL V5.0   W. Landsman   September 1997;-;------------------------------------------------------------- 	function isarray,a, help=hlp 	if (n_params(0) lt 1) or keyword_set(hlp) then begin	  print,' Tests if the argument is an array.' 	  print,' flag = isarray(a)' 	  print,'   a = variable to test.                                in'	  print,'   flag = test result: 0 if not array, else non-zero.   out' 	  return, -1	endif 	if n_elements(a) eq 0 then return, 0	s = size(a)	return, s[0] ne 0	end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?