[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] C_truep( C_fixnump( w ))
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] C_truep( C_fixnump( w )) |
Date: |
Mon, 25 Feb 2008 14:55:02 +0100 |
On Mon, Feb 25, 2008 at 1:28 PM, Heinrich Taube <address@hidden> wrote:
> thank you both very much. just to be sure:
>
> (1) should i be using a C_truep() around C_immediatep() like the other
> predicate tests or is this ok:
>
> if ( C_immediatep(w) ) {
> if ( C_truep(C_fixnump(w)) ) {
> ...
> }
>
> else if ( C_truep(C_blockp(w)) && C_truep( C_flonump( w ) )) {
>
Yes, this is correct. It is obviously inconsistent, but C_immediatep was
intended to be used from C and C_fixnump from compiled code.
Changing this will break old (compiled) code.
>
> (2) how can i test for strictly #f #t boolean value inside the
> immedatep clause?
>
(x == C_SCHEME_FALSE || x == C_SCHEME_TRUE)
cheers,
felix