title: Could I define new variables in the Modelica script?
body: <p>I am trying to run a Modelica script in Dymola, but I got an error when defining a variable in the script, as shown below:</p>
  <pre><code>     Modelica.SIunits.Distance testData=2;
       Boolean success;
       success := clearlog();
       Modelica.Utilities.Streams.print(&quot;Simulation result was:&quot;);
       Modelica.Utilities.Streams.print(&quot;Distance = &quot; + String(testData) + &quot; m&quot;);
  </code></pre>
  <p><a href="https://i.stack.imgur.com/UFkQU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UFkQU.png" alt="enter image description here" /></a></p>
  <p>My question is:<Br>
  Could I define new variables in the Modelica script?<Br>
  I didn't find any regulation or chapter about the Modelica script file in the Modelica Specification 3.4, is there any reference material for Modelica script file specification?</p>