List[Null, Null, Null, Null, Null, Null, Null, Notebook[List[Cell[CellGroupData[List[Cell["Exercise 2 - Initialization of Variables", "Title"], Cell[CellGroupData[List[Cell["Question", "Section"], Cell["How can a variable be initialized?", "Text"], Cell[CellGroupData[List[Cell["Answer", "Subsection"], Cell["If nothing is specified, the default start value of all numerical variables is zero, apart from function results and local variables where it is unspecified. Other start values can be specified by setting the start attribute of instance variables. You can also set the initial value like this:\n", "Text"], Cell["when (initial())\nx_dot = -5;\nend when;", "ModelicaInput"]], Closed]]], Open]], Cell[CellGroupData[List[Cell["Initializing Variables", "Section"], Cell[TextData[List["Declare the variables length1, length2 and length3 of type ", StyleBox["Real", Rule[FontFamily, "Courier"]], " with different initial values. One of the variables should have the value 0. Name the class ", StyleBox["Variables", Rule[FontFamily, "Courier"]], "."]], "Text"], Cell["", "ModelicaInput"], Cell[CellGroupData[List[Cell["Answer", "Subsection"], Cell["class Variables\n  Real length1(start = 3.5);\t\t// Initial value 3.5\n  Real length2(start = 2.0);\t\t// Initial value 2\n  Real length3;\t\t\t\t\t\t// Initial value 0, but you could write (start = 0) if you want to\nend Variables;", "ModelicaInput"]], Closed]]], Open]]], Open]]], Rule[FrontEndVersion, "4.1 for Microsoft Windows"], Rule[ScreenRectangle, List[List[0, 1280], List[0, 951]]], Rule[WindowSize, List[931, 924]], Rule[WindowMargins, List[List[0, Automatic], List[Automatic, 0]]], Rule[StyleDefinitions, "MathModelica.nb"]], Null, Null, Null, Null, Null]