type/environmentvariable - Maple Help

type/environmentvariable

determine whether the given expression is an environment variable

 Calling Sequence type(expr, environmentvariable)

Parameters

 expr - any expression

Description

 • The call type(expr, environmentvariable) returns true if expr is an environment variable.
 • If an environment variable is assigned a value, you need to protect it from evaluation when passing it to the type command. You can do this using unevaluation quotes.
 • For internal reasons, the ditto operators %, %%, and %%%, which are environment variables, cannot be passed to the type command without being evaluated. As a consequence, this command will not detect them as environment variables.

Examples

The number 6 and the variable x are not environment variables, but Order is.

 > $\mathrm{type}\left(6,\mathrm{environmentvariable}\right)$
 ${\mathrm{false}}$ (1)
 > $\mathrm{type}\left('x',\mathrm{environmentvariable}\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{type}\left('\mathrm{Order}',\mathrm{environmentvariable}\right)$
 ${\mathrm{true}}$ (3)

If you forget to quote Order, it will evaluate to its value (by default 6), which is not an environment variable.

 > $\mathrm{type}\left(\mathrm{Order},\mathrm{environmentvariable}\right)$
 ${\mathrm{false}}$ (4)

Compatibility

 • The type/environmentvariable command was introduced in Maple 2021.