#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; #define tf(IsTrue) ((IsTrue) ? "True" : "False") int main() { uCalc uc; // Define a variable and a function uc.DefineVariable("myVar As Int16 = 55"); uc.DefineFunction("myFunc(x) = x * 10.5"); // Implicitly returns Double // Inspect their types dynamically auto typeVar = uc.DataTypeOf("myVar"); auto typeFunc = uc.DataTypeOf("myFunc"); cout << "Variable Type: " << typeVar.Name() << endl; cout << "Function Return: " << typeFunc.Name() << endl; // Check specific properties if (tf(typeVar.BuiltInTypeEnum() == BuiltInType::Integer_16)) { cout << "Variable is strictly a 16-bit integer." << endl; } }