Unit conversion
Posted: 15 Jul 2014, 14:25
Function CUnit
Version 5.1.14 and higher
Function CUnit converts value from one physical unit to another.
Syntax:
double X = CUnit(double Value, string TargetUnit)
or
double X = CUnit(double Value, string TargetUnit, string SourceUnit)
Notes:
If no SourceUnit is set, function convert value from basic SI unit to the TargetUnit.
Source and Target unit must be defined by a static string (not a variable, function, ...).
Version 5.1.14 and higher
Function CUnit converts value from one physical unit to another.
Syntax:
double X = CUnit(double Value, string TargetUnit)
or
double X = CUnit(double Value, string TargetUnit, string SourceUnit)
Notes:
If no SourceUnit is set, function convert value from basic SI unit to the TargetUnit.
Source and Target unit must be defined by a static string (not a variable, function, ...).