lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scheme optional arguments, number-list


From: Mark Knoop
Subject: Scheme optional arguments, number-list
Date: Sat, 23 Apr 2016 13:28:48 +0100

On upgrading to 2.19.32, one of my regular functions no longer works.
It seems that a single number as the first argument is now accepted as a
number-list whereas before it was not and thus became the second
argument.

Whilst the new possibility to write lists as 1,2,3,4 is very nice, is
there any way to alter my function definition to achieve the old
behaviour?

myFunction = #(define-void-function
  (a b c d)
  ((number-list? '()) number? (boolean? #t) fraction?)
  (print "\na=~s b=~s c=~s d=~s\n" a b c d))

{
  % this works when all arguments are specified
  \myFunction 1,2,3,4 4 ##t 4/4
  % not specifying first argument no longer works
  \myFunction 4 4/4
}

I suspect this is related to commit
2a66e23f356503ef916d51efa3f00cae5958dc48 
Issue 4811/1: Allow property paths as scalars and in assignments

--
Mark Knoop



reply via email to

[Prev in Thread] Current Thread [Next in Thread]