Searches a specified block within the currently open file for an integer attribute. Returns the integer value of the selected attribute, or 0 if the attribute is not found or other errors occur.
Format
READ_T_O_INTEGER (Block Name, Attribute)
Prerequisites
READ_T_O_OPEN_FILE (Filename)
Arguments
Block Name | Name of block in which to search |
Attribute | Name of attribute within the specified block to retrieve the integer value. |
Examples
[The following assumes this file has already been opened (“<acar_shared>/driver_controls.tbl/constant_radius_cornering.dcf”).]
Function | READ_T_O_INTEGER(“EXPERIMENT”, “INITIAL_GEAR”) |
Result | 3 |
Function | READ_T_O_INTEGER(“EXPERIMENT”, “INITIAL_SPEED”) |
Result | 16 |
This call returns the integer representing the “INITIAL_SPEED”. Note that in this case, READ_T_O_REAL is a better choice.
Function | READ_T_O_INTEGER(“EXPERIMENT”, “EXPERIMENT_NAME”) |
Result | 0 |
This call fails since ‘EXPERIMENT_NAME’ is a string.
Important: | Filenames are case sensitive and parameters are not case sensitive. |