#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; auto myVar = uc.DefineVariable("myVar = 255.5"); auto ptr = myVar.ValueAddr(); // Get the DataType object for Double auto doubleType = uc.DataTypeOf("Double"); // Read from memory and format as Fixed with 2 decimal places cout << doubleType.ToString(ptr, FormatStyle::Fixed, 2) << endl; // Read from memory and format with a custom pattern cout << doubleType.ToString(ptr, "Result = Format('--{:6.1f}--', double(Result))") << endl; }