ItemHandleField

Applies to:Fast Math Parser
Class:uCalc.Item
Handle for a uCalc.Item
Remarks
Example 1: returning data type names for the different definitions of the "+" operator

Dim PlusOperator = uc.GetItemOf("+")

while PlusOperator.ItemHandle <>  0 

   Console.WriteLine("Def: " + PlusOperator.Text() + "  Type: " + PlusOperator.GetDataType().Name())
   PlusOperator = PlusOperator.NextOverload()
End while

' Output
' Def: Operator_: 70 +{x}  Type: double
' Def: Operator_: 50 {x} + {y}  Type: double
' Def: Operator_: 50 {x As Int32} + {y As Int32} As Int32  Type: Int32
' Def: Operator_: 50 {x As String} + {y As String} As String  Type: string
' Def: Operator_: 50 {x} + {y As Complex} As Complex  Type: complex
' Def: Operator_: 50 {x As Complex} + {y} As Complex  Type: complex
' Def: Operator_: 50 {x As Complex} + {y As Complex} As Complex  Type: complex

          

var PlusOperator = uc.GetItemOf("+");

while (PlusOperator.ItemHandle != null) {
   Console.WriteLine("Def: " + PlusOperator.Text() + "  Type: " + PlusOperator.GetDataType().Name());
   PlusOperator = PlusOperator.NextOverload();
}
// Output
// Def: Operator: 70 +{x}  Type: double
// Def: Operator: 50 {x} + {y}  Type: double
// Def: Operator: 50 {x As Int32} + {y As Int32} As Int32  Type: Int32
// Def: Operator: 50 {x As String} + {y As String} As String  Type: string
// Def: Operator: 50 {x} + {y As Complex} As Complex  Type: complex
// Def: Operator: 50 {x As Complex} + {y} As Complex  Type: complex
// Def: Operator: 50 {x As Complex} + {y As Complex} As Complex  Type: complex

          

//var PlusOperator = uc.GetItemOf('+');

      while PlusOperator.ItemHandle <>  0  do
begin
    
         WriteLn('Def: ' + PlusOperator.Text() + '  Type: ' + PlusOperator.GetDataType().Name());
         PlusOperator = PlusOperator.NextOverload();

End;
      // Output
// Def: Operator_: 70 +{x}  Type: double
// Def: Operator_: 50 {x} + {y}  Type: double
// Def: Operator_: 50 {x As Int32} + {y As Int32} As Int32  Type: Int32
// Def: Operator_: 50 {x As String} + {y As String} As String  Type: string
// Def: Operator_: 50 {x} + {y As Complex} As Complex  Type: complex
// Def: Operator_: 50 {x As Complex} + {y} As Complex  Type: complex
// Def: Operator_: 50 {x As Complex} + {y As Complex} As Complex  Type: complex

          

auto PlusOperator = uc.GetItemOf("+");

while (PlusOperator.ItemHandle != NULL) {
   cout << "Def: " << PlusOperator.Text() << "  Type: " << PlusOperator.GetDataType().Name() << endl;
   PlusOperator = PlusOperator.NextOverload();
}
// Output
// Def: Operator: 70 +{x}  Type: double
// Def: Operator: 50 {x} + {y}  Type: double
// Def: Operator: 50 {x As Int} + {y As Int} As Int  Type: int
// Def: Operator: 50 {x As String} + {y As String} As String  Type: string
// Def: Operator: 50 {x} + {y As Complex} As Complex  Type: complex
// Def: Operator: 50 {x As Complex} + {y} As Complex  Type: complex
// Def: Operator: 50 {x As Complex} + {y As Complex} As Complex  Type: complex

          

auto PlusOperator = uc.GetItemOf("+");

while (PlusOperator.ItemHandle != 0) {
   Console::WriteLine("Def: " + PlusOperator.Text() + "  Type: " + PlusOperator.GetDataType().Name());
   PlusOperator = PlusOperator.NextOverload();
}
// Output
// Def: Operator: 70 +{x}  Type: double
// Def: Operator: 50 {x} + {y}  Type: double
// Def: Operator: 50 {x As Int} + {y As Int} As Int  Type: int
// Def: Operator: 50 {x As String} + {y As String} As String  Type: string
// Def: Operator: 50 {x} + {y As Complex} As Complex  Type: complex
// Def: Operator: 50 {x As Complex} + {y} As Complex  Type: complex
// Def: Operator: 50 {x As Complex} + {y As Complex} As Complex  Type: complex

          
Prev | Next