At 1:47 PM +1100 3/12/05, Andrew Savige wrote:
Running this program with perl 5:
my $i = int(1.9);
print "i=$i\n";
produces the answer 1 (i.e. it truncates) while running it with Pugs
produces the answer 2 (i.e. it rounds).
Is this a bug or a feature?
If a feature, how does one truncate with Pugs/Perl6?

I would say that truncation is what should happen, as with Perl 5, unless Larry explicitly changed it to do rounding with Perl 6. Generally speaking, any behaviour should be the same as Perl 5 unless explicitly said to be different. -- Darren Duncan

Reply via email to