fsVarsNamedVarGet

NOTE: Deprecated. Use fsVarsLVarGet instead.

The fsVarsNamedVarGet function can be used to get the value of a specific Named Var.

 

Syntax
void fsVarsNamedVarGet(
    FsNamedVarId var,
    FsUnitId unit,
    double* result
);

 

Parameters
Parameters Description
var

The ID of a named var.

unit The ID of an unit (found using fsVarsGetUnitId).
result The value that will receive the value of the NamedVar.

 

Return Values

The function returns a FsVarError, 0 means there is no error. In that case, the value of the named varaible has been set in result.

 

Example
FsUnitId unitId = fsVarsGetUnitId("DEGREES");
FsNamedVarId namedId = fsVarsRegisterNamedVar("TOTO");
double result = 0;
if (fsVarsNamedVarGet(namedId , unitId, &result) == FS_VAR_ERROR_NONE)
{
    // valid
}
else
{
    // error
}