Running Rascal: starting a terminal with a read-eval-print-loop
- On the Unix or Windows Commandline, start a Rascal Shell by:
java -jar rascal-<version>.jar
- In VScode, in the command palette type
Create Rascal Terminal
- In Eclipse, from the button bar select the button with the Rascal logo.
- With Maven, Create New Project first and then type:
You will be prompted for input right after the version is printed and a lot of information about the current searchpath configuration.
Exit the terminal REPL
Here we show how to quit the terminal:
Similarly you could type
CTRL+D which indicates end-of-file to terminate the process.
rascal>1 + 1
rascal>myList = [ i | i <- [1..11], i % 2 == 0];
rascal>println("Hello <myList> is <size(myList)> long");
Hello [2,4,6,8,10] is 5 long
Next you could create a new Rascal project to start writing Rascal code.