Code

Code

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Modelica code conventions of class and instance names, parameters and variables are specified separately. In this section it is summarized how to refer to Modelica code in the HTML documentation.

  1. For constants, parameters and variables in code segments <code> and </code> should to be used, e.g.,
    parameter Modelica.SIunits.Time tStart "Start time"
  2. Write multi or single line code segments using <pre> and </pre>.
  3. Multi line or single line code shall not be indented.
  4. Inline code segments may be typeset with <code> and </code>.
  5. In code segments use bold to emphasize Modelica keywords.
Example 1
<pre>
<strong>connector</strong> Frame
   ...
   <strong>flow</strong> SI.Force f[3] <strong>annotation</strong>(unassignedMessage="...");
<strong>end</strong> Frame;
</pre>

appears as

connector Frame
   ...
   flow SI.Force f[3] annotation(unassignedMessage="...");
end Frame;
Example 2
<pre>
<strong>parameter</strong> Modelica.SIunits.Conductance G=1 "Conductance";
</pre>

appears as

parameter Modelica.SIunits.Conductance G=1 "Conductance";