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

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

> 

type⁡1,literal

true

(1)
> 

type⁡12,literal

true

(2)
> 

type⁡0.5,literal

true

(3)
> 

type⁡String,literal

true

(4)
> 

type⁡Name,literal

false

(5)
> 

type⁡ab,literal

false

(6)
> 

type⁡ab,literal

false

(7)
> 

type⁡2+47⁢I,literal

true

(8)

See Also

type

type/atomic

type/complex

type/float

type/fraction

type/identical

type/integer

type/numeric

type/rational

type/string