Inline

Inline

Information

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

Annotation for code generation (inline function body)

Syntax

   annotation"(" Inline "=" ( false | true ) ")

Description

Has only an effect within a function declaration.

If "Inline = true", the model developer proposes to inline the function. This means, that the body of the function is included at all places where the function is called.

If "Inline = false", the model developer proposes to not inline the function.

Example usage

Inline = true is for example used in Modelica.Mechanics.MultiBody.Frames and in functions of Modelica.Media to have no overhead for function calls such as resolving a vector in a different coordinate system and at the same time the function can be analytically differentiated, e.g., for index reduction needed for mechanical systems.