lilypond-user
[Top][All Lists]
Advanced

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

Re: Wish for short version function


From: Noeck
Subject: Re: Wish for short version function
Date: Fri, 10 Jan 2014 14:23:19 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Hi David,

Am 10.01.2014 10:15, schrieb David Kastrup:
> guile> (format "LilyPond ~:@{~a.~a~}" (ly:version))
> "LilyPond 2.19"
> 
> That does not really require a command of its own.

That is indeed quite short and usable. I am still a stranger to scheme.
I suppose it does something like in python "%d.%d".format(version) but
the ~, : and @ signs look like magic to me.
I will read this:
http://www.gnu.org/software/guile/manual/html_node/Formatted-Output.html


>> Why integrated?
> 
> You'll likely be writing a format string anyway.

So far not, I always did this (which I find much more readable):
\markup { "Lilypond" #(lilypond-version) }

Thanks,
Joram



reply via email to

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