type/constant - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Programming : Data Types : Type Checking : Types : type/constant

type/constant

check for a constant

 Calling Sequence type(x, constant)

Parameters

 x - any expression

Description

 • The call type(x, constant) verifies whether x is a constant.
 • The expressions described on the page constant are of type constant. Additionally, a Maple expression is of type constant if it is an unevaluated function with all arguments of type constant, or a sum, product, or power with all operands of type constant. For additional details, see constant.

Examples

 > $\mathrm{type}\left(5,\mathrm{constant}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(0.05,\mathrm{constant}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(\mathrm{ln}\left(-\mathrm{π}\right),\mathrm{constant}\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(\mathrm{∞},\mathrm{constant}\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{type}\left(g\left(1\right),\mathrm{constant}\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{type}\left(\mathrm{false},\mathrm{constant}\right)$
 ${\mathrm{true}}$ (6)
 > $\mathrm{type}\left({x}^{2},\mathrm{constant}\right)$
 ${\mathrm{false}}$ (7)

 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam