query the basic data type of an expression
The whattype(expr) function returns the data type name of expr, which may be any of the following basic data types:
Although exprseq is not a type name known to the type function, it is the name of the internal data structure for expression sequences.
For a general expression, whattype returns the "top level" data type as determined by the order of precedence of the operators.
If the expression is an object whose type name occurs either the object itself, or specifically to whattype, the object type's name is returned. If the object's type is not known, whattype returns object as the type.
The whattype function produces slightly different output if invoked as whattype[kernel](expr):
If expr is a software or hardware floating point, whattype returns float or hfloat respectively, instead of returning float for both cases.
If expr is an object, whattype returns object for any object, even if it has a known name.
a ≔ 1:
b ≔ hello:
M ≔ rtable⁡1,2,3,4
N ≔ Matrix⁡1,2,3,4
q ≔ DEQueue⁡5,6,7
Download Help Document
What kind of issue would you like to report? (Optional)