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 the right Id associated to the given name. If an error occurred, the function will return -1.
Example
FsUnitId unitId = fsVarsGetUnitId("DEGREES"); // valid
FsUnitId wrongUnitId = fsVarsGetUnitId("toto"); // returns -1