type/environmentvariable
determine whether the given expression is an environment variable
Calling Sequence
Parameters
Description
Examples
Compatibility
type(expr, environmentvariable)
expr
-
any expression
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.
The number 6 and the variable x are not environment variables, but Order is.
type⁡6,environmentvariable
false
type⁡x,environmentvariable
type⁡Order,environmentvariable
true
If you forget to quote Order, it will evaluate to its value (by default 6), which is not an environment variable.
The type/environmentvariable command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
Download Help Document