[Moscow.pm] WTF?

Yuri Pac yu.pats на gmail.com
Вт Дек 23 04:22:07 PST 2008


И всетаки
via perldoc -f int

Usually, the "sprintf", "printf", or the "POSIX::floor" and
"POSIX::ceil" functions will serve you better than will int().

2008/12/23 Andrew Shitov <andy на shitov.ru>:
>> разочаровать
>> perl -MData::Dumper -e 'print Dumper( int((8.37-0.37)*100) == 800 )'
>
> Стандартное решение:
> perl -MData::Dumper -e 'print Dumper( int((8.37-0.37  )*100 + 0.5) == 800)'
>
>


-- 
WBR, Yuri Pac


Подробная информация о списке рассылки Moscow-pm