View Raw SPL
/*****************************************************************************
* *
* ISARRAY.SPL Copyright (C) 2010 DSP Development Corporation *
* All Rights Reserved *
* *
* Author: Randy Race *
* *
* Synopsis: Returns 1 if input is an array *
* *
* Revisions: 18 Jul 2010 RRR Creation *
* *
*****************************************************************************/
#include
#if @HELP_ISARRAY
ISARRAY
Purpose: Returns 1 if input parameter is an array
Syntax: ISARRAY(val)
val - series, array or string input
Returns: The array 1 if the input is a array, else 0.
Example:
isarray(3i)
returns 0
Example:
isarray({3i})
returns 1
Example:
isarray("string")
returns 0
Remarks:
If the input is non-numeric, isarray returns 0.
See Also:
Iscomplex
Isreal
Isscalar
#endif
/* is input array ? */
isarray(s)
{
if (argc < 1)
{
/* implies current window */
s = refwindow(w0);
}
/* test value for array */
return(IS_ARRAY(s));
}