whattype - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Data Types : Type Checking : whattype

whattype

query the basic data type of an expression

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

whattype(expr)

Parameters

expr

-

any expression

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`

object

`or`

procedure

record

series

set

string

symbol

table

uneval

unknown

`xor`

zppoly

Matrix

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

whattypex&plus;y

`+`

(1)

whattypexy

`+`

(2)

whattypex

`*`

(3)

whattypex2fy

`*`

(4)

whattypexy

`*`

(5)

whattypexy

`^`

(6)

whattype1x

`^`

(7)

whattypex&comma;y

exprseq

(8)

whattypex&comma;y&comma;z

list

(9)

whattype2&plus;4I

complexextended_numeric

(10)

whattypea

symbol

(11)

a1&colon;

whattypea

integer

(12)

bhello&colon;

whattypeb

string

(13)

Mrtable1&comma;2&comma;3&comma;4

M:=1234

(14)

whattypeM

Array

(15)

NMatrix1&comma;2&comma;3&comma;4

N:=1234

(16)

whattypeN

Matrix

(17)

See Also

exprseq

NumericClass

operators[precedence]

type

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam