type/literal
check for an object of type literal
Calling Sequence
Parameters
Description
Examples
type(x, literal)
x
-
any expression
The call type(x, literal) checks to see if x is of type literal. It returns true if x is of type literal, and false otherwise.
An object is of type literal if it is of type complex({float,numeric}) or string. This includes expressions of type integer, fraction, float, and complex combinations of these. (The alternative float is included in the type complex({float,numeric}) in order to cover such expressions as Float(infinity) and 5. + Float(undefined)*I.)
To verify whether an expression identically matches a specified expression, use the type/identical command.
type⁡1,literal
true
type⁡12,literal
type⁡0.5,literal
type⁡String,literal
type⁡Name,literal
false
type⁡ab,literal
type⁡2+47⁢I,literal
See Also
type
type/atomic
type/complex
type/float
type/fraction
type/identical
type/integer
type/numeric
type/rational
type/string
Download Help Document