type/local
check for a local variable
Calling Sequence
Parameters
Description
Supertypes
Examples
type(x, `local`)
type(x, `local`(t))
x
-
any expression
t
type
The call type(x,`local`) returns true if x is a local variable and false otherwise.
More precisely, it returns true if x is a symbol, and is not equal to the global variable with the same name. This includes module exports, but not environment variables.
The name local 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,`local`
false
type⁡convert⁡x,`local`,`local`
true
f := proc() local a; a end proc:
z≔f⁡
z≔a
type⁡z,`local`
See Also
convert/global
convert/local
type/global
Download Help Document