ItemOf selection between infix version of - (minus) operator and unary prefix version with Properties
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