next up previous contents
Next: 3.2.5 Sub-Model Classes Up: 3.2.4 Methods Previous: 3.2.4 Methods The return Statement

The evaluation of an MDL class method can be stopped at any time by using a return statement.

return boolean_expression;

boolean_expression can be any valid MDL statement resulting in a value of the type MdlBool. To indicate successful evaluation of the MDL method the returned value should be true. If no return statement is given at the end of an MDL method block that method will return true. Therefore MDL methods which will always succeed do not require any return statements.

Robert Mlekus