diff --git a/src/main.d b/src/main.d index f1a7359..bfd9442 100644 --- a/src/main.d +++ b/src/main.d @@ -198,12 +198,12 @@ i := i + 5.5; else { write("Enter test source #"); string answer; - answer = readln(); + answer = trim(readln()); if (answer =="") { loop = false; break; } - int i = to!int(answer.trim()); + int i = to!int(answer); source = sources[i]; } writeln(); @@ -219,15 +219,17 @@ i := i + 5.5; writeln("---------------"); sard.compile(source); writeln(); - writeln("Press enter to run"); +// writeln("Press enter to run"); //getch(); - readln(); + //readln(); writeln("----- Run -----"); sard.run(); writeln(); writeln("----- Result -----"); + foreground = Color.lightCyan; string s = sard.result; writeln(s); + foreground = Color.initial; writeln(); } writeln("---------------"); @@ -252,7 +254,7 @@ i := i + 5.5; foreground = Color.initial; } writeln("Press enter to stop"); - //getch(); - readln(); + getch(); + //readln(); return 0; } \ No newline at end of file diff --git a/src/sard/process.d b/src/sard/process.d index 55137a2..e3c019d 100644 --- a/src/sard/process.d +++ b/src/sard/process.d @@ -93,7 +93,7 @@ public: } result = stack.results.current.result.value.asText(); debug { - writeln("The value isssss: " ~ result); + writeln("The value is: " ~ result); } } };