readRealParameterRead the value of a Real parameter from file |
This information is part of the Modelica Standard Library maintained by the Modelica Association.
result = readRealParameter(fileName, name);
This function demonstrates how a function can be implemented that reads the value of a parameter from file. The function performs the following actions:
On file "test.txt" the following lines might be present:
// Motor data J = 2.3 // inertia w_rel0 = 1.5*2; // relative angular velocity phi_rel0 = pi/3
The function returns the value "3.0" when called as:
readRealParameter("test.txt", "w_rel0")
fileName |
Type: String Description: Name of file |
---|---|
name |
Type: String Description: Name of parameter |
result |
Type: Real Description: Actual value of parameter on file |
---|