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.

Item = [Item]

Property

Product: 

Class: 

Retrieves the underlying Item object that represents this data type, enabling access to common symbol properties.

Remarks

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:

💡 Comparative Analysis

This concept is similar to reflection in languages like C# or Java.

  • In C#, typeof(int) returns a System.Type object.
  • In uCalc, uc.DataTypeOf("Int") returns a 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.

Examples

How to retrieve the Item from a DataType to access its name.

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
				
					#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;
}
				
			
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
				
			
Data Type Name via Item: int
Internal test to verify behavior when retrieving the Item for a non-existent data type.

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: ''
				
					#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;
}
				
			
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
				
			
Item Is Found: False
Item Name: ''