The REPL (Read-Eval-Print Loop) lets you run Ze code line by line, experiment with expressions, and test snippets without writing a file.
Starting the REPL
Run Ze with no arguments:
$ Ze
Ze v0.1 -- trilingual interactive shell
Type Ctrl-C or 'exit' to quit.
>>
Basic Usage
Type any expression or statement and press Enter. The result is printed immediately.
>> set x = 10
>> show x * 2
20
>> show "Kamusta, " + "mundo!"
Kamusta, mundo!
>> type(42)
number
Multi-line Blocks
When a line ends with : (opening a block), the REPL switches to continuation mode and shows ... until the block is complete. End the block by entering a blank line.
>> define double(n):
... return n * 2
...
>> show double(7)
14
>> if x is at least 10:
... show "Big number"
...
Big number
>> for i in range(3):
... show i
...
0
1
2
Persistence Across Lines
Variables, functions, and everything you define in the REPL stay available for the rest of the session.
>> set greeting = "Uy, "
>> define hey(name):
... show greeting + name
...
>> hey("Zyron")
Uy, Zyron!
Exiting
Press Ctrl-C or type exit (or close the terminal).
Tips
- All three languages work in the REPL — mix freely.
- Use
word(x)to inspect values as strings:show word(fruits). - Use
type(x)to check what type a value is. - Errors print a message and return you to the prompt; the session continues.