moduledefinition - Maple Help

type/moduledefinition

check for a module definition

 Calling Sequence type(expr, moduledefinition)

Parameters

 expr - any expression

Description

 • An expression of type moduledefinition is generated by the syntax for module definitions.
 • The command type(expr, moduledefinition) returns true if expr is of type moduledefinition. Otherwise, false is returned.
 • Module definitions are not normally encountered in routine programming, since they evaluate immediately to modules. However, they may occur in procedure bodies, or in other, enclosing module definitions.

Examples

 > $\mathrm{type}\left(\mathbf{module}\left(\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{end module},\mathrm{moduledefinition}\right)$
 ${\mathrm{false}}$ (1)
 > $\mathrm{type}\left(\mathbf{module}\left(\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{end module},\mathrm{module}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left('\mathbf{module}\left(\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{end module}',\mathrm{moduledefinition}\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left('\mathbf{module}\left(\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{end module}',\mathrm{module}\right)$
 ${\mathrm{false}}$ (4)