diff --git a/Modelica/Math/FastFourierTransform.mo b/Modelica/Math/FastFourierTransform.mo index c2e3199bd7..06bab8c20c 100644 --- a/Modelica/Math/FastFourierTransform.mo +++ b/Modelica/Math/FastFourierTransform.mo @@ -535,7 +535,7 @@ which is a complete example where an FFT is computed during simulation and store ")); end realFFT; - function realFFTwriteToFile "Write real FFT computation to file" + impure function realFFTwriteToFile "Write real FFT computation to file" extends Modelica.Icons.Function; import Modelica.Utilities.Streams.print; import Modelica.Units.Conversions.to_deg; diff --git a/Modelica/Math/Nonlinear.mo b/Modelica/Math/Nonlinear.mo index c827dba958..6de6840f00 100644 --- a/Modelica/Math/Nonlinear.mo +++ b/Modelica/Math/Nonlinear.mo @@ -5,7 +5,7 @@ package Nonlinear "Library of functions operating on nonlinear equations" "Examples demonstrating the usage of the functions in package Nonlinear" extends Modelica.Icons.ExamplesPackage; - function quadratureLobatto1 "Integrate integral with fixed inputs" + impure function quadratureLobatto1 "Integrate integral with fixed inputs" extends Modelica.Icons.Function; import Modelica.Utilities.Streams.print; @@ -87,7 +87,7 @@ The following integrals are computed: ")); end quadratureLobatto1; - function quadratureLobatto2 "Integrate integral with user dependent inputs" + impure function quadratureLobatto2 "Integrate integral with user dependent inputs" extends Modelica.Icons.Function; import Modelica.Utilities.Streams.print; @@ -159,7 +159,7 @@ The following integrals are computed: ")); end quadratureLobatto2; - function solveNonlinearEquations1 + impure function solveNonlinearEquations1 "Solve nonlinear equations with fixed inputs" extends Modelica.Icons.Function; import Modelica.Utilities.Streams.print; @@ -238,7 +238,7 @@ The following nonlinear equations are solved: ")); end solveNonlinearEquations1; - function solveNonlinearEquations2 + impure function solveNonlinearEquations2 "Solve nonlinear equations with user dependent inputs" extends Modelica.Icons.Function; import Modelica.Utilities.Streams.print; diff --git a/Modelica/Math/Random.mo b/Modelica/Math/Random.mo index f85b660349..6d3774a35b 100644 --- a/Modelica/Math/Random.mo +++ b/Modelica/Math/Random.mo @@ -1054,7 +1054,7 @@ path is provided. ")); end automaticLocalSeed; - function initializeImpureRandom + impure function initializeImpureRandom "Initializes the internal state of the impure random number generator" extends Modelica.Icons.Function; input Integer seed diff --git a/Modelica/Math/package.mo b/Modelica/Math/package.mo index 6a875a6082..c8ba6d2ae4 100644 --- a/Modelica/Math/package.mo +++ b/Modelica/Math/package.mo @@ -694,7 +694,7 @@ package Matrices "Library of functions operating on matrices" package Examples "Examples demonstrating the usage of the Math.Matrices functions" extends Modelica.Icons.ExamplesPackage; - function solveLinearEquations + impure function solveLinearEquations "Demonstrate the solution of linear equation systems" extends Modelica.Icons.Function; import Modelica.Utilities.Streams.print; diff --git a/Modelica/Mechanics/MultiBody/Visualizers/Colors/colorMapToSvg.mo b/Modelica/Mechanics/MultiBody/Visualizers/Colors/colorMapToSvg.mo index 4e8a41ea7f..665e74e232 100644 --- a/Modelica/Mechanics/MultiBody/Visualizers/Colors/colorMapToSvg.mo +++ b/Modelica/Mechanics/MultiBody/Visualizers/Colors/colorMapToSvg.mo @@ -1,5 +1,5 @@ within Modelica.Mechanics.MultiBody.Visualizers.Colors; -function colorMapToSvg +impure function colorMapToSvg "Save a color map on file in svg (scalable vector graphics) format" extends Modelica.Icons.Function; encapsulated type HeaderType = enumeration( diff --git a/ModelicaTest/Math.mo b/ModelicaTest/Math.mo index 26d07b7cc9..75ddd018a0 100644 --- a/ModelicaTest/Math.mo +++ b/ModelicaTest/Math.mo @@ -660,7 +660,7 @@ extends Modelica.Icons.ExamplesPackage; ok := true; end Vectors; - function colorMapToSvg "Store all predefined color maps in svg" + impure function colorMapToSvg "Store all predefined color maps in svg" extends Modelica.Icons.Function; import Modelica.Mechanics.MultiBody.Visualizers.Colors.colorMapToSvg; import Modelica.Mechanics.MultiBody.Visualizers.Colors.ColorMaps.{jet, hot, gray, spring, summer, autumn, winter}; @@ -762,7 +762,7 @@ extends Modelica.Icons.ExamplesPackage; model TestMatricesExamplesSolveLinearEquations extends Modelica.Icons.Example; - equation + initial equation Modelica.Math.Matrices.Examples.solveLinearEquations(); annotation (experiment(StopTime=0)); end TestMatricesExamplesSolveLinearEquations; diff --git a/ModelicaTest/package.mo b/ModelicaTest/package.mo index 3f79e3e59f..8f17ff8388 100644 --- a/ModelicaTest/package.mo +++ b/ModelicaTest/package.mo @@ -4,7 +4,7 @@ extends Modelica.Icons.Package; import Modelica.Units.SI; -function testAllFunctions "Runs all test cases for functions" +impure function testAllFunctions "Runs all test cases for functions" extends Modelica.Icons.Function; import Modelica.Utilities.Streams.print; input String logFile = "ModelicaTestLog.txt"