CSci 1301 - Introduction to DrRacket in CSci lab (Sci 2610, 2650).

DrRacket is allready insalled in all the computers in the CSci lab. To start DrRacket, go to the left upper corner, select Applications -> Programming -> DrRacket.

Before you can start having fun with basic computations, you have to tell DrRacket what level you will be using. Because DrRacket can handle multiple levels of language complexity, we are going to begin by selecting "Language Beginning Student": in DrRacket go to Language -> Choose Language -> How to design programs -> Beginning Student, click OK.

Now in the bottom part of DrRacket window you should see Beginning Student.

For more information on DrRacket setup see Getting Started with DrScheme section on the textbook web site.

The top section called the definition window, this is where you define your programs. The bottom window, some times called the result window/panel, displays the results of the operations in the definition window once you click the Run icon on the top right side of DrRacket (or press Ctrl-T). It is used for testing your work. The window with some definitions looks like this:

You can save your work in a file and load a file into the definitions window later. Racket files commonly have .rkt extension.

To save your Racket definitions from the definitions window into a file, go to File -> Save Definitions As, choose a file name and a folder where you want the file to be saved.

To load a file, go to File -> Open, select the file (you might have to navigate to the right folder), and click OK. Important: when a file is saved, the system automatically inserts some meta-data in the beginning of the file. Unfortunately, this meta-data is not processed right in Beginner Student. After you load the file, just delete the meta-data or comment it out by putting ; in front of it.


CSci 1301 course web site.