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:
Creates a bitmask for querying items by their properties, such as function, operator, or variable.
A 64-bit integer bitmask representing the combined properties, for use with the ItemOf method.
This static helper function is the primary tool for building complex, multi-property queries with the ItemOf method. It takes one or more property flags from the ItemIs enum and combines them into a single 64-bit integer bitmask that ItemOf can use to filter and retrieve items.
It allows you to find items that match a specific set of criteria, such as "find all items that are either a prefix or a postfix operator."
SelectAny vs. SelectAllBy default, Properties creates a filter that matches items with any of the specified properties (a logical OR). You can change this behavior by including a selector flag as the first argument.
ItemIs::SelectAny (Default)The returned item must match at least one of the provided properties. This is the default behavior and does not need to be specified explicitly if it's the desired logic.
ItemIs::SelectAllThe returned item must match all of the provided properties (a logical AND). This is used for creating highly specific filters.
Bitmask Conversion: Internally, members of the ItemIs enum are sequential integers (0, 1, 2, ...). The ItemOf method, however, expects a bitmask where properties correspond to powers of two (1, 2, 4, ...). This function handles that conversion automatically.
VB.NET Requirement: In C# and C++, you can pass a single ItemIs member directly to ItemOf thanks to method overloading. However, because VB.NET does not distinguish enums from integers in the same way, you must use this Properties function even when filtering by a single property.
vs. LINQ (C#): In LINQ, you would build a similar query using lambda expressions and logical operators, which is often more readable for native .NET development:
var operators = items.Where(i => i.IsPrefix || i.IsPostfix);uCalc's Properties method uses a classic bitmasking approach common in C-style APIs. Its main advantage is being completely language-agnostic, providing the exact same query mechanism for C#, C++, and VB.NET developers.
vs. SQL: The SelectAny and SelectAll logic is analogous to using OR and AND in a SQL WHERE clause to filter results from a database table.
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
ID: 45
using uCalcSoftware;
var uc = new uCalc();
// Returns number of operands for the given operators
Console.WriteLine(uc.ItemOf("-", uCalc.Properties(ItemIs.Infix)).Count);
Console.WriteLine(uc.ItemOf("-", uCalc.Properties(ItemIs.Prefix)).Count);
// You can pass one property directly in C++ and C#, but not VB
Console.WriteLine(uc.ItemOf("-", ItemIs.Infix).Count);
Console.WriteLine(uc.ItemOf("-", ItemIs.Prefix).Count);
2
1
2
1 using uCalcSoftware; var uc = new uCalc(); // Returns number of operands for the given operators Console.WriteLine(uc.ItemOf("-", uCalc.Properties(ItemIs.Infix)).Count); Console.WriteLine(uc.ItemOf("-", uCalc.Properties(ItemIs.Prefix)).Count); // You can pass one property directly in C++ and C#, but not VB Console.WriteLine(uc.ItemOf("-", ItemIs.Infix).Count); Console.WriteLine(uc.ItemOf("-", ItemIs.Prefix).Count);
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
// Returns number of operands for the given operators
cout << uc.ItemOf("-", uCalc::Properties(ItemIs::Infix)).Count() << endl;
cout << uc.ItemOf("-", uCalc::Properties(ItemIs::Prefix)).Count() << endl;
// You can pass one property directly in C++ and C#, but not VB
cout << uc.ItemOf("-", ItemIs::Infix).Count() << endl;
cout << uc.ItemOf("-", ItemIs::Prefix).Count() << endl;
}
2
1
2
1 #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; // Returns number of operands for the given operators cout << uc.ItemOf("-", uCalc::Properties(ItemIs::Infix)).Count() << endl; cout << uc.ItemOf("-", uCalc::Properties(ItemIs::Prefix)).Count() << endl; // You can pass one property directly in C++ and C#, but not VB cout << uc.ItemOf("-", ItemIs::Infix).Count() << endl; cout << uc.ItemOf("-", ItemIs::Prefix).Count() << endl; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
'// Returns number of operands for the given operators
Console.WriteLine(uc.ItemOf("-", uCalc.Properties(ItemIs.Infix)).Count)
Console.WriteLine(uc.ItemOf("-", uCalc.Properties(ItemIs.Prefix)).Count)
'// You can pass one property directly in C++ and C#, but not VB
Console.WriteLine(2) '// C++ and C# only: uc.ItemOf("-", ItemIs::Infix).@Count();
Console.WriteLine(1) '// C++ and C# only: uc.ItemOf("-", ItemIs::Prefix).@Count();
End Sub
End Module
2
1
2
1 Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() '// Returns number of operands for the given operators Console.WriteLine(uc.ItemOf("-", uCalc.Properties(ItemIs.Infix)).Count) Console.WriteLine(uc.ItemOf("-", uCalc.Properties(ItemIs.Prefix)).Count) '// You can pass one property directly in C++ and C#, but not VB Console.WriteLine(2) '// C++ and C# only: uc.ItemOf("-", ItemIs::Infix).@Count(); Console.WriteLine(1) '// C++ and C# only: uc.ItemOf("-", ItemIs::Prefix).@Count(); End Sub End Module