fsVarsGetUnitId
The fsVarsGetUnitId function can be used to get the FsUnitId of a specific unit using its name.
Syntax
FsUnitId fsVarsGetUnitId(
const char* unitName
);
Parameters
| Parameters | Description |
|---|---|
unitName |
The name of the unit. |
Return Values
The function returns ID associated with the given unit name. If an error occurred, the function will return -1.
Example
FsUnitId unitId = fsVarsGetUnitId("DEGREES"); // valid
FsUnitId wrongUnitId = fsVarsGetUnitId("toto"); // returns -1
Related Topics