in reply to Re^3: Passing undef to XSUB
in thread Passing undef to XSUB

It (presumably) compiles and runs, but I wouldn't say it works. Not only does it introduce a warning, it gives incorrect results for arguments equal to zero.

Replies are listed 'Best First'.
Re^5: Passing undef to XSUB
by syphilis (Archbishop) on May 08, 2008 at 07:32 UTC
    it gives incorrect results for arguments equal to zero

    Yes ... I had missed the important point that 0 ought to be evaluated as 0 (and not -1).

    Now I understand what your speculative code was driving at.

    Cheers,
    Rob