Skip to content

Commit

Permalink
Fix additional := error, and some whitespace cleanup surrounding :=.
Browse files Browse the repository at this point in the history
  • Loading branch information
maltelenz authored and beutlich committed Jan 27, 2024
1 parent 494e5e2 commit aae206b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ModelicaReference/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1980,7 +1980,7 @@ Example of function partial application as argument, positional argument passing
<strong>input</strong> Real A;
<strong>input</strong> Real w;
<strong>algorithm</strong>
y:=A*Modelica.Math.sin(w*x);
y := A*Modelica.Math.sin(w*x);
<strong>end</strong> Sine;

//Call with function partial application as named input argument:
Expand All @@ -2000,7 +2000,7 @@ application:
<strong>input</strong> Real x; // Note: x is now last in argument list.
<strong>output</strong> Real y;
<strong>algorithm</strong>
y:=A*Modelica.Math.sin(w*x);
y := A*Modelica.Math.sin(w*x);
<strong>end</strong> Sine2;

// The partially evaluated Sine2 has only one argument:
Expand Down Expand Up @@ -2085,7 +2085,7 @@ Define specialized class <em>function</em>
<strong>input</strong> Real x;
<strong>output</strong> Real y;
<strong>algorithm</strong>
y = <strong>if abs</strong>(x) &lt; Modelica.Constants.eps <strong>then</strong> 1 <strong>else</strong> Modelica.Math.sin(x)/x;
y := <strong>if abs</strong>(x) &lt; Modelica.Constants.eps <strong>then</strong> 1 <strong>else</strong> Modelica.Math.sin(x)/x;
<strong>end</strong> si;</pre></blockquote>

<div>
Expand Down Expand Up @@ -2207,7 +2207,7 @@ can also have an optional functional default value. Example:
// With default: input Integrand integrand := Modelica.Math.sin;
<strong>output</strong> Real integral;
<strong>algorithm</strong>
integral :=(x2-x1)*(integrand(x1) + integrand(x2))/2;
integral := (x2-x1)*(integrand(x1) + integrand(x2))/2;
<strong>end</strong> quadrature;

<strong>partial function</strong> Integrand
Expand Down

0 comments on commit aae206b

Please sign in to comment.