membertype - test a set, list, function, or module for a given type
|
Calling Sequence
|
|
membertype(x, s, 'p')
|
|
Parameters
|
|
x
|
-
|
type
|
s
|
-
|
set, list, function, or module
|
'p'
|
-
|
(optional) an unevaluated name
|
|
|
|
|
Description
|
|
•
|
Given a set, list, or function s, the membertype(x, s) function determines if there is an operand of type x. Given a module, it determines if there is an assigned export of type x. It returns true if so, and false otherwise.
|
•
|
If a third argument 'p' is present and membertype yields true, then the position of the first x in s is assigned to p in the case of sets and lists, while the member instance is assigned to the name p if s is a module.
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
>
|
|
| (7) |
>
|
|
| (8) |
|
|
Download Help Document
Was this information helpful?