is numeric, is integer, is numeric or blank, is integer or blank, is strictly numeric, is strictly integer, is strictly numeric or blank, is strictly integer or blank
is numeric returns true if the value provided is a numeral
is numeric or blank returns true if the value provided is a numeral or a blank string.
is integer returns true if the value provided is a whole number (aka integer)
is integer or blank returns true if the value provided is a whole number (aka integer) or a blank string.
is strictly numeric returns true if the value provided is a numeral
is strictly numeric or blank returns true if the value provided is a numeral or a blank string.
is strictly integer returns true if the value provided is a whole number (aka integer)
is striclty integer or blank returns true if the value provided is a whole number (aka integer) or a blank string.
Attention: If the function name does not contain the word strictly, then strings containing legitimate numbers with and without
decimal point, minus sign and scientific notation (exponents) are also considered as numbers.
Indirect parameter passing is disabled
1
No. | Type | Description |
---|---|---|
1 input |
valid types | Value Value to check. |
Type | Description |
---|---|
boolean | Result true if criteria is met. |
for all parameters( { 1, '1', 1.1, '1.1', '1.1E+03', '1.1234E+03', '', ' ', 'a' }, p[] )
{
print(p[],": is ");
if (is numeric(p[])) print ("numeric, ");
if (is strictly numeric(p[])) print ("strictly numeric, ");
if (is integer(p[])) print ("integer, ");
if (is strictly integer(p[])) print ("strictly integer, ");
if (is numeric or blank(p[])) print ("numeric or blank, ");
if (is strictly numeric or blank(p[])) print ("strictly numeric or blank, ");
if (is integer or blank(p[])) print ("integer or blank, ");
if (is strictly integer or blank(p[])) print ("strictly integer or blank, ");
echo;
}
1: is numeric, strictly numeric, integer, strictly integer, numeric or blank, strictly numeric or blank, integer or blank, strictly integer or blank,
1: is numeric, integer, numeric or blank, integer or blank,
1.1: is numeric, strictly numeric, numeric or blank, strictly numeric or blank,
1.1: is numeric, numeric or blank,
1.1E+03: is numeric, integer, numeric or blank, integer or blank,
1.1234E+03: is numeric, numeric or blank,
: is numeric or blank, strictly numeric or blank, integer or blank, strictly integer or blank,
: is
a: is