Converts an object to an integer.
Xis any object
X is an integer stored in any object of number type, then
integer(X) returns this integer as an integer object.
X is a vector, matrix, list, set, or structure – in each case containing only a single element which is an integer – then this integer is returned in the form of an integer object.
X is a string, an attempt is made to parse it as an integer. If successful, the parsed integer is returned.
In all other cases,
integer(X) returns an error.
'((z ≔ 1 + i^2), (n ≔ integer(z))) @ type
complex number integer
integer(❨❨5, 9, 3, 1❩❩ ⋅ ❨❨7❩, ❨2❩, ❨4❩, ❨0❩❩)
integer(❨❨5, 9, 3, 1❩❩ ⋅ ❨❨7❩, ❨2❩, ❨4❩, ❨i❩❩)
Object cannot be represented as a 64-bit integer.
Call stack: integer
integer("1 234 567 890 123 456")
Type conversion functions (list)