View PlGroup Zahlen/Rechnen
ID | 16 |
---|---|
Text | Zahlen/Rechnen |
Title | Not set |
PlItems
- import java.text.*; // mindestens 1 Vorkommastelle, genau 2 Nachkommastellen DecimalFormat f = new DecimalFormat("#0.00"); double d1 = 1234.4843; double d2 = 0.2; System.out.println(f.format(d1)); System.out.println(f.format(d2)); // Ausgabe d1=1234,4843 <--- man beachte das Komma! // Ausgabe d2=0,2
- ' siehe auch: http://blogs.msdn.com/b/bwelcker/archive/2006/09/26/end-of-amnesia-_2800_avoiding-divide-by-zero-errors_2900_.aspx =IIf(Fields!SecondVal.Value = 0, "0", Fields!FirstVal.Value*100 / IIf(Fields!SecondVal.Value = 0, 1, Fields!SecondVal))