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

# Online Help

###### All Products    Maple    MapleSim

type/global

check for a global variable

 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.

Supertypes

 •

Examples

 > $\mathrm{type}\left(x,\mathrm{global}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(\mathrm{convert}\left(x,\mathrm{local}\right),\mathrm{global}\right)$
 ${\mathrm{false}}$ (2)
 > f := proc() global a; a end proc:
 > $z≔f\left(\right)$
 ${z}{≔}{a}$ (3)
 > $\mathrm{type}\left(z,\mathrm{global}\right)$
 ${\mathrm{true}}$ (4)

 See Also