in reply to 0.123, float or integer
That is weird. Well either something is forcing the initial scalar to integer or afterwards forcing the product to integer. I would say Devel::Peek is your friend. Place some Dump calls before and after your multiplication and check for NV, IV, and PV values.
#!/usr/local/bin/perl -wd use Devel::Peek; $v = "21.654"; $w = 2; $x = ""; $x = $w * $v; Dump( $x ); $x = int($x); Dump( $x );
-derby
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: 0.123, float or integer
by guha (Priest) on Feb 06, 2002 at 10:22 UTC | |
by jmcnamara (Monsignor) on Feb 06, 2002 at 10:57 UTC | |
|
Re: Re: 0.123, float or integer
by guha (Priest) on Feb 05, 2002 at 23:55 UTC |