On Thu, Nov 09, 2000 at 09:36:39PM -0700, Nathan Torkington wrote:
> Thanks to those who answered my question about the headers.  I have
> two new ones:

[snip first question about OUTPUT, to which I don't know the answer]

> Second question: when I use the SvIV function to extract the integer
> value from a scalar, I don't get the same behaviour Perl seems to
> exhibit.  When I turn "24 dogs" into an integer, I get 0 (and a
> warning about "argument isn't numeric").  If I try that in Perl (for
> example, with addition) I get 24.  What am I missing?

PV->NV causes that to happen, PV->IV does not. You see it in Perl
because addition uses NVs. It works fine if you change your example code
to use SvNV, giving 48.

-dlc

Reply via email to