lilypond-user
[Top][All Lists]
Advanced

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

LilyPond version predictaes [was: Problems with LilyJAZZ.ily]


From: Urs Liska
Subject: LilyPond version predictaes [was: Problems with LilyJAZZ.ily]
Date: Thu, 10 Oct 2013 11:34:55 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130801 Thunderbird/17.0.8

Thanks Harm for the report and Marc for the suggestion.

Actually when reading your first email I had already noticed and fixed the issue.
I'm somewhat frustrated how this could have happened. Originally I typed that function correctly and I would have sworn someone has modified it afterwards. Unfortunately the Git log shows that this 'someone' must have been me :-(

OK, it's fixed now and extended by the other predicates:
https://github.com/openlilylib/snippets/blob/master/general-tools/lilypond-version-predicates.ily and
https://github.com/openlilylib/snippets/blob/master/general-tools/lilypond-version-predicates-example.ly

I think this can be useful for any functions that should execute version-dependent code.
For example to make LilyJAZZ includable regardless of the run LilyPond version?

Best
Urs

Am 10.10.2013 08:51, schrieb Marc Hohl:
Am 10.10.2013 01:56, schrieb Thomas Morley:
2013/10/9 Urs Liska <address@hidden>:
[...]

One more thing which might be useful for the technical issues you are
talking about:
I started a snippet to switch program execution based on the used LilyPond
version
https://github.com/openlilylib/snippets/blob/master/specific-solutions/lilypond-version-switch.ly
Currently there is only one function 'lilypond-greater-than?' but I intend
to add equivalents to the other comparison operators. I think this approach
should allow you to make LilyJAZZ work with 2.16 and 2.17 at the same time?

HTH
Urs

Hi Urs,

your coding will not work.
Regard the results from:

2.12.3  -> 17
2.14.2  -> 18
2.16.2  -> 20
2.17.28 -> 47
seems to be ok,

though:

2.15.40 -> 57

You need to do a more detailed comparison.

Under the assumption that the last part of the version will never
exceed 99, why not go for

x.y.z -> (x*1000)+(y*100)+z

or, to be on the safe side for the next 300 years or so ;-)

x.y.z -> (x*10^6)+(y*10^3)+z

Just my 2ct

Marc

Cheers,
   Harm

_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user



_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user


reply via email to

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