OMWebBook
Evaluate Cell
Eval All
Exercise 3 - Local Classes
1 Creating a Local Class
Create a class,
Addition
, and define the class Add below as a local class in Addition.
class Add Real x = 1; Real y = 2; Real z; equation x + y = z; end Add;
1.1
Answer
class Addition class Add Real x = 1; Real y = 2; Real z; equation x + y = z; end Add; end Addition;
1.1.1 Simulation of Addition
simulate( Addition )