[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Accessing Grob properties
From: |
Urs Liska |
Subject: |
Re: Accessing Grob properties |
Date: |
Fri, 22 Jan 2016 23:32:30 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
Am 22.01.2016 um 21:54 schrieb David Kastrup:
>> However, from there I don't get any further, and it seems I totally
>> > don't understand how the Scheme types are matched in C++.
>> > Any attempt to compare the content of beam_count_prop with a set of
>> > predefined values seems to fail, and even
>> >
>> > if (scm_equal_p (ly_symbol2scm ("one"), ly_symbol2scm ("two")))
>> >
>> > returns true (using scm_equal_p equally as for the eq and eqv
>> > versions.
> It does not return true but SCM_BOOL_F. Which you then convert to a
> true C++ boolean since it is non-zero.
>
> You want if (scm_is_eq (... ))
> instead: predicates with name xxx_is_yyy return a C (or C++) boolean.
> Predicates with name xxx_p return an SCM boolean which you need to
> convert to a C++ boolean using, for example, scm_is_true.
>
> ...
>
> SCM_BOOL_F as a C condition is _true_ rather than false.
Thank you for this clear and general explanation that will serve me much
further than simply solving the problem at hand. Of course this totally
makes sense - and works perfectly.
Best
Urs
- Re: Handling of subdivisions with shortened beams, (continued)
- Re: Handling of subdivisions with shortened beams, Kieren MacMillan, 2016/01/18
- Re: Handling of subdivisions with shortened beams, Urs Liska, 2016/01/18
- Re: Handling of subdivisions with shortened beams, Simon Albrecht, 2016/01/18
- Re: Handling of subdivisions with shortened beams, Kieren MacMillan, 2016/01/18
- Re: Handling of subdivisions with shortened beams, Urs Liska, 2016/01/18
- Accessing Grob properties (was: Handling of subdivisions with shortened beams), Urs Liska, 2016/01/22
- Re: Accessing Grob properties, David Kastrup, 2016/01/22
- Re: Accessing Grob properties, Urs Liska, 2016/01/22
- Re: Accessing Grob properties, Urs Liska, 2016/01/22
- Re: Accessing Grob properties, David Kastrup, 2016/01/22
- Re: Accessing Grob properties,
Urs Liska <=
- Re: Accessing Grob properties, Paul Morris, 2016/01/24