Scalar data type identification.
More...
Scalar data type identification.
See validation results.
function is_between |
( |
v |
, |
|
|
l |
, |
|
|
u |
|
|
) |
| |
Test if a numerical value is between an upper and lower bounds.
- Parameters
-
v | <number> A numerical value. |
l | <number> The minimum value. |
u | <number> The maximum value. |
- Returns
- <boolean> true when the value is between the upper and lower bounds and false otherwise.
function is_boolean |
( |
v |
| ) |
|
Test if a value is a predefined boolean constant.
- Parameters
-
- Returns
- <boolean> true when the value is one of the predefined boolean constants
[true|false]
and false otherwise.
function is_decimal |
( |
v |
| ) |
|
Test if a value is a decimal.
- Parameters
-
- Returns
- <boolean> true when the value is a decimal and false otherwise.
function is_defined |
( |
v |
| ) |
|
Test if a value is defined.
- Parameters
-
- Returns
- <boolean> true when the value is defined and false otherwise.
Test if an iterable value is empty.
- Parameters
-
v | <value> An iterable value. |
- Returns
- <boolean> true when the iterable value has zero elements and false otherwise.
Test if a numerical value is even.
- Parameters
-
v | <value> A numerical value. |
- Returns
- <boolean> true when the value is determined to be even and false otherwise (The value may be positive or negative).
Test if a numerical value is infinite.
- Parameters
-
v | <value> A numerical value. |
- Returns
- <boolean> true when the value is determined to be inf (greater than the largest representable number) and false otherwise.
function is_integer |
( |
v |
| ) |
|
Test if a value is an integer.
- Parameters
-
- Returns
- <boolean> true when the value is an integer and false otherwise.
function is_iterable |
( |
v |
| ) |
|
Test if a value has multiple parts and is iterable.
- Parameters
-
- Returns
- <boolean> true when the value is an iterable multi-part value and false otherwise.
data type | defined |
number(s) | false |
boolean | false |
string | true |
list | true |
range | not defined |
undef | false |
inf | false |
nan | false |
Test if a value is an iterable list of values.
- Parameters
-
- Returns
- <boolean> true when the value is a list and false otherwise.
Test if a numerical value is invalid.
- Parameters
-
v | <value> A numerical value. |
- Returns
- <boolean> true when the value is determined to be nan (Not A Number) and false otherwise.
Test if a value is a number.
- Parameters
-
- Returns
- <boolean> true when the value is a number and false otherwise.
- Note
- Returns true for inf and nan values.
Test if a numerical value is odd.
- Parameters
-
v | <value> A numerical value. |
- Returns
- <boolean> true when the value is determined to be odd and false otherwise (The value may be positive or negative).
Test if a value is a range definition.
- Parameters
-
- Returns
- <boolean> true when the value is a range definition and false otherwise.
Test if a value is a single non-iterable value.
- Parameters
-
- Returns
- <boolean> true when the value is a single non-iterable value and false otherwise.
data type | defined |
number(s) | true |
boolean | true |
string | false |
list | false |
range | not defined |
undef | true |
inf | true |
nan | true |
Test if a value is a string.
- Parameters
-
- Returns
- <boolean> true when the value is a string and false otherwise.
function not_defined |
( |
v |
| ) |
|
Test if a value is not defined.
- Parameters
-
- Returns
- <boolean> true when the value is not defined and false otherwise.