REPL
Run otter without a file to start the interactive prompt. Variables set on one line are still there on the next. Type exit to leave it.
PowerShell
otter> name is "Jeff"
otter> say "Hello" name
Hello Jeff
otter> exit
Only exit leaves the REPL; quit is not a command. reset clears every variable and function and keeps the REPL open.
Blocks in the REPL
A line that starts with if, otherwise, while, repeat, count, for or to, or that ends with are, starts a block. The prompt changes to ..... and keeps collecting lines until you enter a blank line, which runs the whole block. Indent the body as you would in a file, and type otherwise lines before the blank line:
PowerShell
otter> x is 5
otter> if x is 4
..... say "four"
..... otherwise
..... say "not four"
.....
not four
Other blocks do not continue onto the next line in the REPL. Write for each ... in instead of each ... in, and put try blocks and indented has blocks in a .ot file and run it with otter run.