Skip to content

Commit da5c5de

Browse files
authored
Merge pull request #4298 from Harisankar-Allimangalath/backport_PR4275
Fix syntax errors in ModelicaReference documentation snippets
2 parents 60774bf + 74424e6 commit da5c5de

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ModelicaReference/package.mo

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,7 +1980,7 @@ Example of function partial application as argument, positional argument passing
19801980
<strong>input</strong> Real A;
19811981
<strong>input</strong> Real w;
19821982
<strong>algorithm</strong>
1983-
y:=A*Modelica.Math.sin(w*x);
1983+
y := A*Modelica.Math.sin(w*x);
19841984
<strong>end</strong> Sine;
19851985
19861986
//Call with function partial application as named input argument:
@@ -2000,7 +2000,7 @@ application:
20002000
<strong>input</strong> Real x; // Note: x is now last in argument list.
20012001
<strong>output</strong> Real y;
20022002
<strong>algorithm</strong>
2003-
y:=A*Modelica.Math.sin(w*x);
2003+
y := A*Modelica.Math.sin(w*x);
20042004
<strong>end</strong> Sine2;
20052005
20062006
// The partially evaluated Sine2 has only one argument:
@@ -2041,7 +2041,7 @@ a component, according to case (d) above:
20412041
<strong>algorithm</strong>
20422042
// Case (b) and (c)
20432043
integral := quadrature(x1, x2,
2044-
<strong>function</strong> quadratureOnce(y1=y1, y2=y2, integrand=integrand);
2044+
<strong>function</strong> quadratureOnce(y1=y1, y2=y2, integrand=integrand));
20452045
<strong>end</strong> surfaceQuadrature;
20462046
</pre></blockquote>
20472047
</html>"));
@@ -2085,7 +2085,7 @@ Define specialized class <em>function</em>
20852085
<strong>input</strong> Real x;
20862086
<strong>output</strong> Real y;
20872087
<strong>algorithm</strong>
2088-
y = <strong>if abs</strong>(x) &lt; Modelica.Constants.eps <strong>then</strong> 1 <strong>else</strong> Modelica.Math.sin(x)/x;
2088+
y := <strong>if abs</strong>(x) &lt; Modelica.Constants.eps <strong>then</strong> 1 <strong>else</strong> Modelica.Math.sin(x)/x;
20892089
<strong>end</strong> si;</pre></blockquote>
20902090
20912091
<div>
@@ -2207,7 +2207,7 @@ can also have an optional functional default value. Example:
22072207
// With default: input Integrand integrand := Modelica.Math.sin;
22082208
<strong>output</strong> Real integral;
22092209
<strong>algorithm</strong>
2210-
integral :=(x2-x1)*(integrand(x1) + integrand(x2))/2;
2210+
integral := (x2-x1)*(integrand(x1) + integrand(x2))/2;
22112211
<strong>end</strong> quadrature;
22122212
22132213
<strong>partial function</strong> Integrand
@@ -2238,7 +2238,7 @@ to the corresponding formal parameter of function type. Example:
22382238
<strong>function</strong> Parabola
22392239
<strong>extends</strong> Integrand;
22402240
<strong>algorithm</strong>
2241-
y = x*x;
2241+
y := x*x;
22422242
<strong>end</strong> Parabola;
22432243
22442244
area = quadrature(0, 1, Parabola);

0 commit comments

Comments
 (0)