uCalc API Version: 5.7.0-preview.1 Released: 7/30/2026
Warning
uCalc API Preview Release Notice:This preview documentation describes the intended behavior of the API. It is not fully accurate or complete.The current preview build contains incomplete features, unoptimized performance, and is subject to breaking changes.Use of the preview version in your production code is not recommended.
Product:
Class:
Retrieves the underlying Item object that represents this data type, enabling access to common symbol properties.
In the uCalc engine, every defined symbol—whether it's a variable, function, or even a data type—is fundamentally represented by a universal Item object. This method serves as the bridge, allowing you to access the underlying Item for a specific DataType instance.
By retrieving the Item, you can treat a data type polymorphically and use the common Item interface to:
IsProperty(ItemIs::DataType)).This concept is similar to reflection in languages like C# or Java.
typeof(int) returns a System.Type object.DataType object, and calling .Item() on that object provides access to the unified symbol table representation.The key difference is that uCalc's Item provides a consistent interface for all engine symbols, not just types, simplifying introspection logic.
ID: 533
using uCalcSoftware;
var uc = new uCalc();
var intType = uc.DataTypeOf(BuiltInType.Integer_32);
// Get the Item representation of the DataType
var itemHandle = intType.Item;
Console.WriteLine($"Data Type Name via Item: {itemHandle.Name}");
Data Type Name via Item: int using uCalcSoftware; var uc = new uCalc(); var intType = uc.DataTypeOf(BuiltInType.Integer_32); // Get the Item representation of the DataType var itemHandle = intType.Item; Console.WriteLine($"Data Type Name via Item: {itemHandle.Name}");
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
auto intType = uc.DataTypeOf(BuiltInType::Integer_32);
// Get the Item representation of the DataType
auto itemHandle = intType.Item();
cout << "Data Type Name via Item: " << itemHandle.Name() << endl;
}
Data Type Name via Item: int #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; auto intType = uc.DataTypeOf(BuiltInType::Integer_32); // Get the Item representation of the DataType auto itemHandle = intType.Item(); cout << "Data Type Name via Item: " << itemHandle.Name() << endl; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
Dim intType = uc.DataTypeOf(BuiltInType.Integer_32)
'// Get the Item representation of the DataType
Dim itemHandle = intType.Item
Console.WriteLine($"Data Type Name via Item: {itemHandle.Name}")
End Sub
End Module
Data Type Name via Item: int Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim intType = uc.DataTypeOf(BuiltInType.Integer_32) '// Get the Item representation of the DataType Dim itemHandle = intType.Item Console.WriteLine($"Data Type Name via Item: {itemHandle.Name}") End Sub End Module
ID: 535
using uCalcSoftware;
var uc = new uCalc();
// Attempt to get an invalid DataType
var invalidType = uc.DataTypeOf("NoSuchType");
// Get its Item representation
var invalidItem = invalidType.Item;
// Check its properties
Console.WriteLine($"Item Is Found: {! invalidItem.IsProperty(ItemIs.NotFound)}");
Console.WriteLine($"Item Name: '{invalidItem.Name}'");
Item Is Found: False
Item Name: '' using uCalcSoftware; var uc = new uCalc(); // Attempt to get an invalid DataType var invalidType = uc.DataTypeOf("NoSuchType"); // Get its Item representation var invalidItem = invalidType.Item; // Check its properties Console.WriteLine($"Item Is Found: {! invalidItem.IsProperty(ItemIs.NotFound)}"); Console.WriteLine($"Item Name: '{invalidItem.Name}'");
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
#define tf(IsTrue) ((IsTrue) ? "True" : "False")
int main() {
uCalc uc;
// Attempt to get an invalid DataType
auto invalidType = uc.DataTypeOf("NoSuchType");
// Get its Item representation
auto invalidItem = invalidType.Item();
// Check its properties
cout << "Item Is Found: " << tf(! invalidItem.IsProperty(ItemIs::NotFound)) << endl;
cout << "Item Name: '" << invalidItem.Name() << "'" << endl;
}
Item Is Found: False
Item Name: '' #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; #define tf(IsTrue) ((IsTrue) ? "True" : "False") int main() { uCalc uc; // Attempt to get an invalid DataType auto invalidType = uc.DataTypeOf("NoSuchType"); // Get its Item representation auto invalidItem = invalidType.Item(); // Check its properties cout << "Item Is Found: " << tf(! invalidItem.IsProperty(ItemIs::NotFound)) << endl; cout << "Item Name: '" << invalidItem.Name() << "'" << endl; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
'// Attempt to get an invalid DataType
Dim invalidType = uc.DataTypeOf("NoSuchType")
'// Get its Item representation
Dim invalidItem = invalidType.Item
'// Check its properties
Console.WriteLine($"Item Is Found: {Not invalidItem.IsProperty(ItemIs.NotFound)}")
Console.WriteLine($"Item Name: '{invalidItem.Name}'")
End Sub
End Module
Item Is Found: False
Item Name: '' Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() '// Attempt to get an invalid DataType Dim invalidType = uc.DataTypeOf("NoSuchType") '// Get its Item representation Dim invalidItem = invalidType.Item '// Check its properties Console.WriteLine($"Item Is Found: {Not invalidItem.IsProperty(ItemIs.NotFound)}") Console.WriteLine($"Item Name: '{invalidItem.Name}'") End Sub End Module