Previous: Comments, Up: Lexical Conventions [Contents][Index]
The following list describes additional notations used in Scheme. See Numbers, for a description of the notations used for numbers.
+ - .
The plus sign, minus sign, and period are used in numbers, and may also occur in an identifier. A delimited period (not occurring within a number or identifier) is used in the notation for pairs and to indicate a “rest” parameter in a formal parameter list (see Lambda Expressions).
( )
Parentheses are used for grouping and to notate lists (see Lists).
"
The double quote delimits strings (see Strings).
\
The backslash is used in the syntax for character constants (see Characters) and as an escape character within string constants (see Strings).
;
The semicolon starts a comment.
'
The single quote indicates literal data; it suppresses evaluation (see Quoting).
`
The backquote indicates almost-constant data (see Quoting).
,
The comma is used in conjunction with the backquote (see Quoting).
,@
A comma followed by an at-sign is used in conjunction with the backquote (see Quoting).
#
The sharp (or pound) sign has different uses, depending on the character that immediately follows it:
#t #f
These character sequences denote the boolean constants (see Booleans).
#\
This character sequence introduces a character constant (see Characters).
#(
This character sequence introduces a vector constant (see Vectors). A close parenthesis, ‘)’, terminates a vector constant.
#e #i #b #o #d #l #s #x
These character sequences are used in the notation for numbers (see Numbers).
#|
This character sequence introduces an extended comment. The comment is terminated by the sequence ‘|#’. This notation is an MIT/GNU Scheme extension.
#!
This character sequence is used to denote a small set of named
constants. Currently there are only two of these, #!optional
and
#!rest
, both of which are used in the lambda
special form
to mark certain parameters as being “optional” or “rest” parameters.
This notation is an MIT/GNU Scheme extension.
#*
This character sequence introduces a bit string (see Bit Strings). This notation is an MIT/GNU Scheme extension.
#[
This character sequence is used to denote objects that do not have a readable external representation (see Custom Output). A close bracket, ‘]’, terminates the object’s notation. This notation is an MIT/GNU Scheme extension.
#@
This character sequence is a convenient shorthand used to refer to objects by their hash number (see Custom Output). This notation is an MIT/GNU Scheme extension.
#=
##
These character sequences introduce a notation used to show circular structures in printed output, or to denote them in input. The notation works much like that in Common Lisp, and is an MIT/GNU Scheme extension.
Previous: Comments, Up: Lexical Conventions [Contents][Index]