Using Properties with ItemOf to disambiguate between the infix and prefix versions of the '-' operator.

ID: 613

				
					using uCalcSoftware;

var uc = new uCalc();
var infix_minus = uc.ItemOf("-", uCalc.Properties(ItemIs.Infix));
var prefix_minus = uc.ItemOf("-", uCalc.Properties(ItemIs.Prefix));

Console.WriteLine($"Operands for infix '-': {infix_minus.Count}");
Console.WriteLine($"Operands for prefix '-': {prefix_minus.Count}");
				
			
Operands for infix '-': 2
Operands for prefix '-': 1
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   auto infix_minus = uc.ItemOf("-", uCalc::Properties(ItemIs::Infix));
   auto prefix_minus = uc.ItemOf("-", uCalc::Properties(ItemIs::Prefix));

   cout << "Operands for infix '-': " << infix_minus.Count() << endl;
   cout << "Operands for prefix '-': " << prefix_minus.Count() << endl;
}
				
			
Operands for infix '-': 2
Operands for prefix '-': 1
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim infix_minus = uc.ItemOf("-", uCalc.Properties(ItemIs.Infix))
      Dim prefix_minus = uc.ItemOf("-", uCalc.Properties(ItemIs.Prefix))
      
      Console.WriteLine($"Operands for infix '-': {infix_minus.Count}")
      Console.WriteLine($"Operands for prefix '-': {prefix_minus.Count}")
   End Sub
End Module
				
			
Operands for infix '-': 2
Operands for prefix '-': 1