whattype - query the basic data type of an expression
|
Calling Sequence
|
|
whattype(expr)
|
|
Description
|
|
•
|
The whattype(expr) function returns the data type name of expr, which may be any of the following basic data types:
|
`*`
|
`+`
|
`.`
|
`..`
|
`::`
|
`<`
|
`<=`
|
`<>`
|
`=`
|
`^`
|
`||`
|
`and`
|
Array
|
complex
|
complex(extended_numeric)
|
exprseq
|
extended_numeric
|
float
|
fraction
|
function
|
hfarray
|
implies
|
indexed
|
integer
|
list
|
module
|
moduledefinition
|
`not`
|
`or`
|
procedure
|
series
|
set
|
string
|
symbol
|
table
|
uneval
|
unknown
|
`xor`
|
zppoly
|
Matrix
|
SDMPolynom
|
Vector[column]
|
Vector[row]
|
|
|
|
|
|
|
|
•
|
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.
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
| (9) |
>
|
|
| (10) |
>
|
|
| (11) |
>
|
|
>
|
|
| (12) |
>
|
|
>
|
|
| (13) |
>
|
|
| (14) |
>
|
|
| (15) |
>
|
|
| (16) |
>
|
|
| (17) |
|
|
Download Help Document
Was this information helpful?