@node Scheme tutorial
@appendix Scheme tutorial
-@cindex @code{#}
+@findex #
@cindex Scheme
@cindex GUILE
@cindex Scheme, in-line code
@item Booleans
Boolean values are True or False. The Scheme for True is @code{#t}
and False is @code{#f}.
-@cindex @code{##t}
-@cindex @code{##f}
+@findex ##t
+@findex ##f
@item Numbers
Numbers are entered in the standard fashion,
@code{1} is the (integer) number one, while @code{-1.5} is a
-floating point number (a non-integer number).
+floating point number (a non-integer number).
@item Strings
Strings are enclosed in double quotes,
mark @code{#}. So, the previous examples translated in LilyPond are
@example
-##t ##f
+##t ##f
#1 #-1.5
#"this is a string"
#"this
@lisp
#(+ 1 2)
- @result{} #3
+ @result{} #3
@end lisp
The arrow @result{} shows that the result of evaluating @code{(+ 1 2)}
@lisp
#(+ 1 (* 3 4))
- @result{} #(+ 1 12)
+ @result{} #(+ 1 12)
@result{} #13
@end lisp
These calculations are examples of evaluations; an expression like
@code{(* 3 4)} is replaced by its value @code{12}. A similar thing
-happens with variables. After defining a variable
+happens with variables. After defining a variable
@example
-twelve = #12
+twelve = #12
@end example
@noindent
variables can also be used in expressions, here
@example
-twentyFour = #(* 2 twelve)
-@end example
+twentyFour = #(* 2 twelve)
+@end example
@noindent
the number 24 is stored in the variable @code{twentyFour}.
#'twentyFour
@end example
-@cindex @code{#'symbol}
+@findex #'symbol
@cindex quoting in Scheme
The quote mark @code{'} prevents the Scheme interpreter from substituting
while @code{twentyFour} is an identifier.
@cindex properties vs. identifiers
-@cindex identifiers vs. properties
+@cindex identifiers vs. properties
Two-dimensional offsets (X and Y coordinates) as well as object sizes
(intervals with a left and right point) are entered as @code{pairs}. A
is entered as @code{(first . second)} and, like symbols, they must be quoted,
@example
-\override TextScript #'extra-offset = #'(1 . 2)
-@end example
+\override TextScript #'extra-offset = #'(1 . 2)
+@end example
This assigns the pair (1, 2) to the @code{extra-offset} property of the
TextScript object. These numbers are measured in staff-spaces, so