hi everyone I learned about the language yesterday and I wanted to use the weekend to try my hands at it so I'm working on a very simple interpreter for Mouse programming language I seem to run into a small problem here though; a $ signals end of file so the interpreter should exit once it's encountered but for some reason the else statement also gets called. any ideas why? `import stack, std/os proc putChar(c: char) = stdout.write c proc startInterpreter(contents: string, stack: var Stack) = var pos = 0 var curChar: char while pos < contents.len and contents[pos] != '$': curChar = contents[pos] case curChar of '$': break; of '"': inc(pos) while pos < contents.len and contents[pos] != '"': if contents[pos] == '!': putChar('\n') else: putChar(contents[pos]) inc(pos) else: echo "value not recognised" inc(pos) if isMainModule: let fileContents: string = if paramCount() > 0: readFile(paramStr(1)) else: "" var globalStack: Stack startInterpreter(fileContents, globalStack) `