Use this page to choose a valid variable or parameter name and understand E110 and E120. The tables separate names checked by the normalizer from notation rejected by the reader.
Try an ordinary name
Paste this complete program into the Playground.
(define else 5)
elseResult
5else is an ordinary name except at the start of a cond, case, or guard clause. In those positions it marks the clause used when no earlier clause matches.
Compare these separate inputs:
| Source | Result or diagnostic code | Reason |
|---|---|---|
(define if 5) | E110 | if is reserved and cannot be bound |
if | E110 | if names a form, not a procedure value |
(define include 1) | E120 | include is forbidden in code |
'include | include | quoted data can contain this symbol |
The normalizer checks these names before evaluation. It also checks expression shapes and rewrites shorthand into core forms.
The 27 reserved names
Binding gives a name a value, as in define, let, or a parameter list. Binding any name below produces E110.
| Group | Names |
|---|---|
| quoting | quote quasiquote unquote unquote-splicing |
| core | lambda if begin set! define |
| binding | let let* letrec |
| branching | cond case guard and or when unless do |
| modules | module export import |
| values and control | values call-with-values call/cc dynamic-wind |
The four names in the last row also refer to procedures, so you can use them as values. The other 23 name syntax forms. Using one of those as a bare value produces E110.
The 12 forbidden forms
These names produce E120 when used as code, whether as a reference, a binding name, or a call. Inside quoted data, they remain ordinary symbols.
| Forms | How to express the task |
|---|---|
define-syntax syntax-rules syntax-case let-syntax letrec-syntax | use procedures for reusable computation; user macros are unsupported |
define-values let-values let*-values | use call-with-values |
define-library include include-ci include-library-declarations | use module and combine source files yourself |
E120 identifies a listed forbidden form or reader extension. An ordinary undefined name such as alpha instead produces E300 when evaluated.
Notation errors during reading
The reader reports these errors before normalization. See Reference for Reading Code for accepted spellings.
| Notation | Diagnostic code |
|---|---|
#; datum comment | E120 |
#lang directive | E120 |
| square or curly brackets | E100 |
datum labels such as #0= and #0# | E100 |
reader directives beginning with #! | E100 |
radix or exactness prefixes #x #b #o #e #i | E100 |
Use line or block comments for annotations in source. A line beginning with ;! is an ordinary comment.
Vertical bars are ordinary name characters. The text |a b| therefore reads as two names, |a and b|. It does not quote a single symbol containing a space.
Form errors and ordinary name lookup
The normalizer rejects a cond arrow clause containing => with E130. In a case clause body, => is read as an ordinary name. If that clause runs and the name is undefined, evaluation produces E300. Defining => supplies its value but does not add arrow-clause behavior.
A bare parameter name, as in (lambda args args), produces E130. To collect extra arguments, use a dotted parameter list. For example:
((lambda (x . rest) rest) 1 2 3)Result
(2 3)The procedure binds x to 1 and rest to the list (2 3). A function definition can collect all arguments with (define (f . xs) xs).