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 an item by iterating through a filtered list of all symbols defined within the uCalc instance.
The Item object at the specified index in the filtered list. Returns an empty item (where IsEmpty() is true) if the index is out of bounds or no items match the filter.
The ItemOf method provides a powerful way to query and iterate through all symbols (functions, variables, operators, etc.) defined within a uCalc instance. By specifying filter criteria, you can create a virtual list of matching items and retrieve a specific one by its index.
This is one of two overloads for ItemOf. This version iterates through a list of items based on their properties, while the other overload finds a specific item by name.
The properties parameter accepts a bitmask that specifies which types of items to include. This mask is typically generated using one of two approaches:
ItemIs::Function to find only functions).ItemIs flags. You can specify whether to match any (ItemIs::SelectAny, default) or all (ItemIs::SelectAll) of the provided properties.Use 0 to create a list of all items without any property filtering.
The index parameter is a zero-based index into the filtered list. To iterate through all matching items, start at index 0 and increment until ItemOf returns an empty item (which you can check with item.IsEmpty() or item.IsProperty(ItemIs::NotFound)).
It's possible for multiple items (like overloaded functions or operators) to share the same name. The includeOverloads parameter controls how these are handled:
false (default): Only the first or primary item for a given name is included in the list.true: All overloads are included as separate entries in the list.In languages like C# or Java, runtime introspection is typically handled by a Reflection API. While extremely powerful, reflection can be complex to use and often carries a performance penalty.
ItemOf provides a more focused and efficient alternative. It is designed specifically for inspecting the uCalc engine's internal state. Instead of navigating complex Type and MemberInfo objects, you get a direct, streamlined Item object that contains all the relevant metadata (name, data type, precedence, etc.) for that symbol.This makes ItemOf the ideal tool for building dynamic applications on top of uCalc, such as:
ID: 77
using uCalcSoftware;
var uc = new uCalc();
var Item = new uCalc.Item();
var x = 0;
// Lists the first few funcions defined in uCalc
// For the full list, loop until Item.IsEmpty() or while Item.NotEmpty()
for ( x = 0; x <= 15; x++) {
Item = uc.ItemOf(ItemIs.Function, x);
Console.WriteLine(Item.Name);
}
Console.WriteLine("---");
// List only Prefix and Postfix (operators)
x = 0;
do {
Item = uc.ItemOf(uCalc.Properties(ItemIs.Prefix, ItemIs.Postfix), x);
x = x + 1;
Console.WriteLine(Item.Name);
} while (Item.NotEmpty());
abs
acos
acosh
addptr
addressof
anytype
append
append_copy
arg
argcount
asc
asin
asinh
atan
atan2
atanh
---
!
+
-
not
~ using uCalcSoftware; var uc = new uCalc(); var Item = new uCalc.Item(); var x = 0; // Lists the first few funcions defined in uCalc // For the full list, loop until Item.IsEmpty() or while Item.NotEmpty() for ( x = 0; x <= 15; x++) { Item = uc.ItemOf(ItemIs.Function, x); Console.WriteLine(Item.Name); } Console.WriteLine("---"); // List only Prefix and Postfix (operators) x = 0; do { Item = uc.ItemOf(uCalc.Properties(ItemIs.Prefix, ItemIs.Postfix), x); x = x + 1; Console.WriteLine(Item.Name); } while (Item.NotEmpty());
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
uCalc::Item Item;
auto x = 0;
// Lists the first few funcions defined in uCalc
// For the full list, loop until Item.IsEmpty() or while Item.NotEmpty()
for ( x = 0; x <= 15; x++) {
Item = uc.ItemOf(ItemIs::Function, x);
cout << Item.Name() << endl;
}
cout << "---" << endl;
// List only Prefix and Postfix (operators)
x = 0;
do {
Item = uc.ItemOf(uCalc::Properties(ItemIs::Prefix, ItemIs::Postfix), x);
x = x + 1;
cout << Item.Name() << endl;
} while (Item.NotEmpty());
}
abs
acos
acosh
addptr
addressof
anytype
append
append_copy
arg
argcount
asc
asin
asinh
atan
atan2
atanh
---
!
+
-
not
~ #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; uCalc::Item Item; auto x = 0; // Lists the first few funcions defined in uCalc // For the full list, loop until Item.IsEmpty() or while Item.NotEmpty() for ( x = 0; x <= 15; x++) { Item = uc.ItemOf(ItemIs::Function, x); cout << Item.Name() << endl; } cout << "---" << endl; // List only Prefix and Postfix (operators) x = 0; do { Item = uc.ItemOf(uCalc::Properties(ItemIs::Prefix, ItemIs::Postfix), x); x = x + 1; cout << Item.Name() << endl; } while (Item.NotEmpty()); }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
Dim Item As New uCalc.Item()
Dim x = 0
'// Lists the first few funcions defined in uCalc
'// For the full list, loop until Item.IsEmpty() or while Item.NotEmpty()
For x = 0 To 15
Item = uc.ItemOf(ItemIs.Function , x)
Console.WriteLine(Item.Name)
Next
Console.WriteLine("---")
'// List only Prefix and Postfix (operators)
x = 0
Do
Item = uc.ItemOf(uCalc.Properties(ItemIs.Prefix, ItemIs.Postfix), x)
x = x + 1
Console.WriteLine(Item.Name)
Loop While Item.NotEmpty()
End Sub
End Module
abs
acos
acosh
addptr
addressof
anytype
append
append_copy
arg
argcount
asc
asin
asinh
atan
atan2
atanh
---
!
+
-
not
~ Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim Item As New uCalc.Item() Dim x = 0 '// Lists the first few funcions defined in uCalc '// For the full list, loop until Item.IsEmpty() or while Item.NotEmpty() For x = 0 To 15 Item = uc.ItemOf(ItemIs.Function , x) Console.WriteLine(Item.Name) Next Console.WriteLine("---") '// List only Prefix and Postfix (operators) x = 0 Do Item = uc.ItemOf(uCalc.Properties(ItemIs.Prefix, ItemIs.Postfix), x) x = x + 1 Console.WriteLine(Item.Name) Loop While Item.NotEmpty() End Sub End Module