Page 1 of 1

Unit conversion

Posted: 15 Jul 2014, 14:25
by PetrS
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, ...).