Luke Palmer <[EMAIL PROTECTED]> writes: >> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm >> Date: Wed, 6 Nov 2002 14:53:37 -0800 >> From: Michael Lazzaro <[EMAIL PROTECTED]> >> X-SMTPD: qpsmtpd/0.12, http://develooper.com/code/qpsmtpd/ >> >> >> 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? > > Trunc. Int context, you know :) > >> my int $n = "5.05ff" # 5, 0, undef, NaN, or exception? > > If it's like Perl5, 5.05. But there could be reason to make it an > exception. Dunno on that one. I would say 5.05 for now, until > someone with authority corrects it. > >> my int $n = "fdsjfdf" # 0, undef, NaN, or exception? > > Likewise here. There could also be reason to have this behave > differently from the last one. Though, I would say 0 for now.
Well, it's restricted to either 0 or an exception since you can't use an int to store anything else (like, for instance the PMCs associate with either undef or NaN). Hmm, what does NaN.isa('Number') return? -- Piers "It is a truth universally acknowledged that a language in possession of a rich syntax must be in need of a rewrite." -- Jane Austen?