Gossamer Forum
Home : General : Perl Programming :

Post deleted by Chef

Quote Reply
Post deleted by Chef
Quote Reply
Re: How to fix a result? In reply to
Are you sure that is the correct part.......

When you find the bit that prints the number add this....

printf("%.2f", $variablethatprintsnumber)

That will limit it to 2 decimal places.

Paul Wilson.
Installations:
http://www.wiredon.net/gt/
Quote Reply
Post deleted by Chef In reply to
Quote Reply
Re: How to fix a result? In reply to
Change
Code:
$FORM{$name} = $value; }
To
Code:
$FORM{$name} = sprintf("%.2f", $value); }
Happy Coding,

--Drew
http://www.FindingHim.com
Quote Reply
Re: How to fix a result? In reply to
Hi Junko,

thanks for your hint - but there's no change in the result ...

Quote Reply
Re: How to fix a result? In reply to
printf and sprintf do the same thing, just at different points in time. Printf does the rounding at the point of printing; sprintf saves the result of rounding for future use...

BUT what I think you mean is that that change didn't format anything at all. Search through you script some more or post a .txt copy somewhere so we can look at it and find the right codes...

Happy Coding,

--Drew
http://www.FindingHim.com
Quote Reply
Re: How to fix a result? In reply to
Hi Drew,

just send me a mail to dablast@gmx.de so i'll attach it on a reply ...

Thanks
Chef