Scheme—Tips on using DrScheme
-
Starting DrScheme on the lab machines
There should be an icon in the dock (a red, blue and white circle)
that you can click on. If not, under Applications in the Go menu
along the top of the screen, choose the “PLT Scheme”
folder with the highest version number to access the icon.
-
Choosing a language
Under “Language” on the menu bar, select “Choose
Language...”. In the dialog box that pops up, click on the
triangle next to “How to Design Programs” (in the
category “Teaching Languages”) to see the choices of
teaching languages. Click on “Beginning Student” and
then on the “OK” button.
-
Help Desk
Under ''Help'' on the menu bar, select ''Help Desk''. In the
browser window that opens up, click on ''How to Design Programs
Languages'' in the category ''Languages''. You can click on ''1.15
Primitive Operations'' for functions in the Beginning Student
Language.
-
Unhelpful help
Avoid using the search box in the Help menu, as it does not confine
the search to the documentation.
-
Opening a new file
Under ''File'' on the menu bar, select ''New'' (or ''New Tab'', if
you wish to add tabs to a current window).
-
Opening an existing file
Under ''File'' on the menu bar, select ''Open...''. This will bring
up a window that lets you select a file to open.
-
Saving a file
Press the ''Save'' button on the window. If this is a new file, you
will see a window that lets you choose a name for your file and a
directory to put it in.
-
Copying from a file
You can copy information from one file to another by highlighting
text, choosing ''Copy'' in the ''Edit'' menu on the menu bar,
clicking on the tab or window of another file, and using ''Paste''
in the ''Edit'' menu on the menu bar. The menu also shows keyboard
shortcuts.
-
Loading a teachpack
A teachpack is a file with Scheme definitions in it. Loading a
teachpack means you can use any of the definitions as if they were
built-in. Under ''Language'' on the menu bar, select ''Add
Teachpack...''. In the left column in the window that pops up
''Preinstalled Teachpacks'', choose the appropriate teachpack from
the textbook. For a course teachpack, first download the file (see
above). If it is the first time you are installing a course
teachpack, click on the button ''Add Teachpack to List''. This will
bring up a window that lets you select a file. Once the file has
been added to the list, you can select it from the list
''User-installed Teachpacks.''
-
Clearing all teachpacks
Under ''Language'' on the menu bar, select ''Clear All Teachpacks.''
-
Commenting and uncommenting
Select a block of text (part of a line, one line, or more) in the
Definitions window. Under ''Scheme'' on the menu bar, select
''Comment Out with Semicolons''. You can undo the change using
''Uncomment.'' Do not use comment boxes, or your
assignments will be unmarkable.
-
Indenting
Select a block of text in the Definitions window. Under ''Scheme''
on the menu bar, select ''Reindent''. You can also use ''Reindent
All'' to reindent the entire program. To indent a single line, put
the cursor on the line and press tab.
-
Jumping to a definition
In the top left corner of your window is an arrow labelled
''(define ...)''. When you click here, you get a menu of all your
definitions. You can choose whether they should be sorted by their
order in the file or alphabetically.
-
Red for unused code
After you have run your program, any unused part of the code will
appear in red. This either means that you have parts of the code
that are not needed (and should be removed) or that you need to add
more tests.