Go to the first, previous, next, last section, table of contents.

Returns and Parentheses

A common mistake in Scheme is to forget the closing parentheses of expressions. If you forget a closing parentheses--usually because you need several to close nested expressions--most systems will just hang, waiting you to finish typing the expression.

This is a feature, not a bug. It lets you put <RETURN>s (line breaks) in your input, to format the code on the screen as you type it in. When you type in the last closing expression and hit <RETURN> again, Scheme recognizes that you've typed in a whole expression, and evaluates it and prints the result.

So if you type in an expression and hit <RETURN>, and Scheme doesn't do anything, check to see if you closed all of the parentheses you opened. If not, just type in the missing parenthesis and hit <RETURN> again.

(It's also possible that in your system, you have to do something special to get Scheme to evaluate an expression--like hitting a different key, or clicking on a button or a menu item. In such systems, <return> may be only for formatting the text you're inputting, and another key tells Scheme to go ahead and evaluate what you've typed.)


Go to the first, previous, next, last section, table of contents.