Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() '// This example simulates a full REPL session by iterating through a series of inputs. Console.WriteLine("uCalc Interactive Shell (simulated session)") Console.WriteLine("Type 'exit' or 'quit' to end.") Console.WriteLine("") Dim inputs() As String = { "10 * (5 + 3)", "UCase('hello world')", "1 / 0", "1 +", "exit" } Dim index = 0 Do Console.Write("> ") '// Simulate reading from the console by assigning inputs sequentially. '// In a real application, this would read the input interactively from the console. Dim input = inputs(index) Console.WriteLine(input) '// 1. Check for an exit command If input = "exit" Or input = "quit" Then Console.WriteLine("Exiting.") return End If '// 2. Evaluate the input and 3. Print the result Console.WriteLine(uc.EvalStr(input)) Console.WriteLine("") index = index + 1 Loop While true End Sub End Module