Spaces are allowed between a
' and the sequence of characters
that make up a symbol, but this is discouraged as a matter of
style. Spaces cannot appear between other characters in the
symbol. The set of legal characters to build symbols is the same as
for program variable names, so parentheses, quotes,
| must be avoided. Also, like variable
names, symbols are case-sensitive:
> (symbol=? 'hello 'Hello) false
Don't forget the starting quote. Without it, DrScheme does not see a
symbol, but instead attempts to find the meaning of a name. This can
lead to an error:
> (symbol=? 'hello hello) reference to undefined identifier: hello
> (symbol=? 'and and) Invalid use of keyword and > (symbol=? 'not not) symbol=?: expected symbols as arguments, received 'not and not
(define (is-hello? s) (symbol=? 'hello 's)) ; wrong: 's is never 'hello (define (is-hello? s) (symbol=? 'hello s)) ; right: s is sometimes 'hello
To insert an image into a program, move the blinking caret to the place in your program where you want the image, and select the Insert Image item from the Edit menu. DrScheme will then provide a dialog for selecting an image file. After you have selected a file, the image will be inserted at the blinking caret.
Beware! If you use images in your program, DrScheme saves your program file in a special format, instead of the normal text format. Only DrScheme can read this special format.If there is a problem loading an image from a file, DrScheme displays a box with an ``x'' instead of a picture. The problem is usually due to a corrupted image file.
Images can also be copied from web pages viewed through DrScheme's Help Desk. The File|Open URL... menu item opens a web page in Help Desk.
Under Windows, images copied from other programs (besides DrScheme) can also be pasted into DrScheme.
Exercise 5.1.2 For information about selecting a teachpack, see the Exercise Notes for Exercise 2.2.1.
Exercise 5.1.5 For information about selecting a teachpack, see the Exercise Notes for Exercise 2.2.1.