Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      '// Succinct (Quick Start)
      '// Create two separate uCalc instances
      Dim uc1 As New uCalc()
      Dim uc2 As New uCalc()
      
      '// Parse the same expression string in both instances
      Dim expr1 = uc1.Parse("1 + 1")
      Dim expr2 = uc2.Parse("1 + 1")
      
      '// Use the .uCalc() method and MemoryIndex to verify ownership
      Console.WriteLine($"expr1 belongs to uc1: {expr1.uCalc.MemoryIndex = uc1.MemoryIndex}")
      Console.WriteLine($"expr2 belongs to uc2: {expr2.uCalc.MemoryIndex = uc2.MemoryIndex}")
      Console.WriteLine($"expr1 does not belong to uc2: {expr1.uCalc.MemoryIndex <> uc2.MemoryIndex}")
   End Sub
End Module