[Vienna-pm] [OT] Rundungsverhalten von Perl

Gerfried Fuchs alfie at ist.org
Thu Oct 23 10:52:36 CDT 2003


* Thomas Klausner <domm at zsi.at> [2003-10-23 17:18]:
> Du kannst aber vorher einfach selber runden:
> 
> $a=4/3;
> $b=sprintf("%.0f",$a);  # auf die naechste ganze Zahl
> $c=sprintf("%.2f",$a);  # auf 2 Stellen nach dem Komma

 Wäre fürs demonstrieren wohl besser gewesen, 5/3 zu wählen  *ducks*
Alfie
-- 
  * The 'Yes, I need more sleep, and also to test my releases' release.
 -- David Martínez Moreno, changelog.Debian for freecraft (1.17pre1build16-4)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/vienna-pm/attachments/20031023/ed9c866c/attachment.bin


More information about the Vienna-pm mailing list