Type::Unknown -- type for
testing variables
IntroductionType::Unknown represents identifiers and indexed
identifiers.
Call(s)testtype(obj, Type::Unknown)
Parametersobj |
- | any MuPAD object |
Returnssee testtype
Related
Functions
Detailstesttype(obj, Type::Unknown)
checks, whether obj is an identifier or an indexed
identifier with an integer index. If it is, the call returns TRUE, otherwise FALSE.DOM_IDENT.
An indexed identifier is an expression with
type _index and two operands, the first of
which is an identifier and the second one is an integer. A local variable is not of type
Type::Unknown.
Example
1Type::Unknown accepts identifiers:
>> testtype(x, Type::Unknown)
TRUE
x[0] is an indexed identifier accepted by
Type::Unknown:
>> testtype(x[0], Type::Unknown)
TRUE
The index must be an integer:
>> testtype(x[-1], Type::Unknown), testtype(x[1.0], Type::Unknown)
TRUE, FALSE