Introduction: Running Scheme

Chapter: Introduction: Running Scheme

Scheme is a powerful programming language that will allow you to express complicated algorithms elegantly in very few lines of code. This lab will get you started working with Scheme and introduce you to some of the basics of the language and the environment in which you will be programming.

Although Scheme programs can be compiled into stand-alone executables, we will usually regard Scheme as an interactive language. When you run Scheme, you enter an interactive "shell" within which you can make definitions and run Scheme programs.

The '>' is Scheme's prompt letting you know that the system is ready for input. If you type something at this prompt, Scheme will evaluate it (if it can) and print out the result. Then the system will display another prompt allowing you to type something new. This is called the read-evaluate-print loop. In this fashion, Scheme can serve as an interactive calculator, although (as we'll soon see) it is much more powerful.


rhyspj@cs.gwu.edu