Type::Equation -- a type
representing equations
IntroductionType::Equation represents equations. The types of the
left hand side and the right hand side can be specified.
Call(s)testtype(obj, Type::Equation( <lhs_type <,
rhs_type>>))
Parametersobj |
- | any MuPAD object |
lhs_type |
- | the type of the left hand side; a type can be an
object of the library Type or one of the possible return
values of domtype and
type |
rhs_type |
- | the type of the right hand side |
Returnssee testtype
Related
Functions
Detailstesttype(obj,
Type::Equation(lhs_type,rhs_type)) checks whether type(obj) yields "_equal" and testtype(lhs(obj), lhs_type) and testtype(rhs(obj), rhs_type) both yield TRUE and returns TRUE, if all holds, otherwise FALSE.lhs_type and
rhs_type determine the types of the left hand side and the
right hand side, respectively.lhs_type and
rhs_type are Type::AnyType.The equations lhs=rhs and
rhs=lhs are considered different! E.g., the equation
x=3 matches the type
Type::Equation(DOM_IDENT,DOM_INT), but it does not match
the type Type::Equation(DOM_INT,DOM_IDENT).
assume call.
Example
1The following object is an equation:
>> testtype(x = 3, Type::Equation())
TRUE
The following calls test, whether the object is an equation with an unknown on the left hand side and a positive integer on the right hand side:
>> testtype(x = 3, Type::Equation(Type::Unknown, Type::PosInt)), testtype(x = 0, Type::Equation(Type::Unknown, Type::PosInt))
TRUE, FALSE