Difference between revisions of "NXSL:typeof"
Jump to navigation
Jump to search
(Created page with "__NOTOC__ Returns the data type for given value. == Syntax == typeof(''value''); == Parameters == :{| |- | ''value'' || Object to get data type for. |} == Return Value...") |
m (Text replacement - "^" to "{{deprecated}}") |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | {{deprecated}}__NOTOC__ | ||
Returns the data type for given value. | Returns the data type for given value. | ||
Line 10: | Line 10: | ||
== Parameters == | == Parameters == | ||
:{| | :{| class="wikitable" | ||
|- | |- | ||
| ''value'' || Object to get data type for. | | ''value'' || Object to get data type for. | ||
Line 22: | Line 22: | ||
* null | * null | ||
* object | * object | ||
* array | |||
* iterator | |||
* string | * string | ||
* real | * real | ||
Line 28: | Line 30: | ||
* uint32 | * uint32 | ||
* uint64 | * uint64 | ||
== Examples == | == Examples == |
Latest revision as of 16:13, 13 September 2022
This Wiki is deprecated and we are are currrently migrating remaining pages into product documentation (Admin Guide, NXSL Guide) |
Returns the data type for given value.
Syntax
typeof(value);
Parameters
value Object to get data type for.
Return Value
data type for given value. Type is returned as lowercase string. The following type names can be returned:
- null
- object
- array
- iterator
- string
- real
- int32
- int64
- uint32
- uint64
Examples
typeof("abc") -> "string" typeof(17) -> "int32" typeof(17000000000) -> "int64" typeof($node) -> "object"