type/global - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Data Types : Type Checking : Types : type/global

type/global

check for a global variable

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

type(x, `global`)

type(x, `global`(t))

Parameters

x

-

any expression

t

-

type

Description

• 

The call type(x, `global`) returns true if x is both of type symbol and a global variable, and false otherwise.

• 

The name global is a keyword and therefore it must be enclosed by backquotes in a call to type.

• 

If the parameter t is included, it will check that x is assigned something of that type.

Examples

typex,`global`

true

(1)

typeconvertx,`local`,`global`

false

(2)

f := proc() global a; a end proc:

zf

za

(3)

typez,`global`

true

(4)

See Also

convert/global

convert/local

type

type/local

type/symbol