If anyone knows the answer to these two questions, I'd appreciate it.

1) What do these do?

my int $n = 5; # OK
my int $n = 5.005; # trunc or err?
my int $n = "5.05ff" # 5, 0, undef, NaN, or exception?
my int $n = "fdsjfdf" # 0, undef, NaN, or exception?


2) Do "num" and "int" share a common base "is a number" class, such that (in perl5-ish speak) we can say

if want(numeric) { ... }

to identify both, or is "num" the base class to test for, and "int" a subclass? (I'm pretty much assuming "bit" is a number too, but never mind that now.)

I know that this has been covered before, way back, but my memory fails me. Just trying to polish up what I wrote.

MikeL

Reply via email to