fsVarsLVarSet
The fsVarsLVarSet function can be used to set the value of a specific LVar.
Syntax
FsVarError fsVarsLVarGet(
FsLVarId lVarId,
FsUnitId unitId,
double value
);
Parameters
| Parameters | Description |
|---|---|
lVarId |
The ID of an |
unitId |
The ID of a unit (found using fsVarsGetUnitId). |
| value | The new value of the LVar. |
Return Values
The function returns FsVarError, where 0 means there is no error (in which case, the value has been set in the LVar).
Example
FsUnitId unitId = fsVarsGetUnitId("DEGREES");
FsLVarId lVarId = fsVarsRegisterLVar("Toto");
double value = 5;
if (fsVarsLVarSet(lVarId, unitId, value) == FS_VAR_ERROR_NONE)
{
// valid
}
else
{
// error
}