literal - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


type/literal

check for an object of type literal

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

type(x, literal)

Parameters

x

-

any expression

Description

• 

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.

Examples

type1,literal

true

(1)

type12,literal

true

(2)

type0.5,literal

true

(3)

typeString,literal

true

(4)

typeName,literal

false

(5)

typeab,literal

false

(6)

typeab,literal

false

(7)

type2+47I,literal

true

(8)

See Also

type

type/atomic

type/complex

type/float

type/fraction

type/identical

type/integer

type/numeric

type/rational

type/string