On 10/6/09 3:30 PM, "Nick Payne" <nick.pa...@internode.on.net> wrote:

> If I accidentally omit the spaces in the scheme pair for the tweak
> offset, no error is indicated in the console output but the tweak
> doesn't take effect.

If either (or both) of the spaces surrounding the . in the pair are missing,
then the data structure you are creating is no longer a cons cell of two
numbers.

'(0 . 1) is a cons cell with 0 as the car and 1 as the cdr
'(0. 1) is a list; a cons cell with 0 as the car , and a cons cell with 1 as
the car and '() as the cdr as the cdr.  i.e. car is 0, caar is 1 cadr is '()
'(0 .1) is a list; car is 0, caar is 0.1, cadr is '()
'(0.1) is a list, car is 0.1, cdr is '()

Perhaps the type checking code in scheme should be a bit stronger.

You can avoid this problem by using cons to define your offsets.  Instead of
'(0 . 1) use (cons 0 1) (note that there is no ' before the opening
parenthesis).

HTH,

Carl




_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to