type/global
check for a global variable
Calling Sequence
Parameters
Description
Supertypes
Examples
type(x, `global`)
type(x, `global`(t))
x
-
any expression
t
type
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.
type/symbol
type⁡x,`global`
true
type⁡convert⁡x,`local`,`global`
false
f := proc() global a; a end proc:
z≔f⁡
z≔a
type⁡z,`global`
See Also
convert/global
convert/local
type/local
Download Help Document