Using the Red console, we can execute this script in five ways:
- If it is a small script, you could just copy the code that starts after the header and paste it into the REPL.
- Right-click on hello-world.red and choose Open With. Browse to the Red bat file (on Windows), and select it. The console opens up with the output message. From now on, double-clicking on a Red source file will execute it in the Red console.
- Open a Terminal (in Windows with cmd or a PowerShell console; in Linux/macOS by right-clicking on a folder and choosing Open in Terminal) and navigate to the folder where the source file is. Then type in the command-line, red hello-world.red.
- At the Red console prompt >>, type do %hello-world.red ...