lilypond-devel
[Top][All Lists]
Advanced

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

robust_scm2int, was Re: post-GDP doc team


From: Trevor Daniels
Subject: robust_scm2int, was Re: post-GDP doc team
Date: Wed, 13 Aug 2008 09:27:34 +0100


Neil, you wrote Tuesday, August 12, 2008 11:58 PM
2008/8/7 Trevor Daniels <address@hidden>:

You're right.  The value of 'layer is held as a real, but converted to an
integer before use.  It seems all +ve and -ve integers are effective,
though, so we still have quite a few discrete layers.  I'll incorporate
the essentials of this in the NR.

BTW, I can't find robust_scm2int.  Does this round or truncate?

It's in lily-guile.cc. It does neither: it expects a scm integer, and
if that check fails, falls back to the default value. So in the case
of 'layer, if you set it to a real value, it's ignored; the layer will
be set to 1.

Aah! - that explains the peculiar behaviour that led me to ask the
question!

I've just changed the type check so this won't happen.

Good.  But values outside the range 0-2 should still work,
I think.

Regards,
Neil






reply via email to

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