View Raw SPL
/*****************************************************************************
* *
* ISINTEGER.SPL Copyright (C) 2021 DSP Development Corporation *
* All Rights Reserved *
* *
* Author: Randy Race *
* *
* Synopsis: Returns 1 if input is an integer *
* *
* Revisions: 9 Aug 2021 RRR Creation *
* *
*****************************************************************************/
#include
#if @HELP_ISINTEGER
ISINTEGER
Purpose: Returns 1 if input parameter is an integer
Syntax: ISINTEGER(val)
val - series, scalar or string input
Returns: The scalar 1 if the input is an integer value, else 0.
Example:
isinteger(3i)
returns 0
Example:
isinteger("string")
returns 0
Example:
isinteger(13)
returns 1
Example:
isinteger(1..13)
returns 0
Remarks:
If the input series is empty, isinteger returns 0.
See Also:
Iscomplex
Isreal
#endif
/* is input an integer? */
isinteger(s)
{
local status;
status = (argc > 0) ? IS_INTEGER(s) : 0;
return(status);
}